Refreshing Cgridview In A Dialog


I was wondering if anyone has come up with a way to refresh a grid that is contained in a dialog? What I don’t want to do is have to re-render the whole page but rather I’d like to be able to just return the updated data for the grid. Here’s an example of my code:



			// additional javascript options for the dialog plugin


					'title'=>'Select Instructors To Email',






		echo CHtml::beginForm();

		echo '<div id="print-grid"></div>';


		$this->widget('bootstrap.widgets.TbExtendedGridView', array(


			'type' => 'striped bordered',

			'dataProvider' => $taskProvider,

			'template' => "{items}",


			'bulkActions' => array(

				'actionButtons' => array(


						'buttonType' => 'button',

						'type' => 'primary',

						'size' => 'small',

						'label' => 'Send Email',

						'click' => 'js:function(values)








				'checkBoxColumnConfig' => array(

						'name' => 'task_id'




			'columns' => array(														




         echo CHtml::endForm();



Thanks for your help!

If you don’t want to reload whole page, just update the content in the dialog, try to use AJAX way.

I tried it by CGridView, it works.


Yii::app()->clientScript->registerScript('search', "

$('.search-form form').submit(function(){

	$('#tool-grid').yiiGridView('update', {

		data: $(this).serialize()


	return false;