get widget string instead render

	$dataProvider=new CActiveDataProvider('UsedKeysTemp');

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



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

			'',  // 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?


Check the API:


[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







), 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! :])