get widget string instead render


	$dataProvider=new CActiveDataProvider('UsedKeysTemp');


	$this->widget('zii.widgets.grid.CGridView', array(

		'dataProvider'=>$dataProvider,

		'columns'=>array(

			'title',          // display the 'title' attribute

			'category.name',  // display the 'name' attribute of the 'category' relation

			'content:html',   // display the 'content' attribute as purified HTML

		),

	));

widget always print to page, any way to get just the html string and no print to page?

thanks

Check the API: http://www.yiiframework.com/doc/api/1.1/CBaseController#widget-detail

Thanks!

[size=2]Set third (last) parameter of [/size]widget[size=2] to [/size]TRUE[size=2]. I.e.:[/size]


<?php $filtersButton = $this->widget('bootstrap.widgets.TbButton', array

    (

        'label'=>'Filtruj',

        'type'=>'success',

        'size'=>'small',

        'icon'=>'search',

        'htmlOptions'=>array('class'=>'search-button')

), TRUE); ?>

(I’m adding this answer, because I always forget this obvious thing, always searching Yii forum only to find this thread, so I want to avoid additional click – jump to documentation! :])