AjaxSubmit, update in CGrideview

Hi,

I am facing issue in setting value return from AJAX call to update the data in CGrideView.

Here is code for the button that is being used for processing




echo CHtml::ajaxSubmitButton(

  'Create',

  array('commentary/create'),

  array(


	

	'success'=>'function(id) {  

				if(id){

			  $.fn.yiiGridView.update("commentary-grid", {url:"'.Yii::app()->createUrl('/commentary/ajax',array('task_id'=>"{id}")).'"});

	

	          $("#commentaryDialog").dialog("close");

			  

			  }

	}'

	

	

  ));



Any help?

Got it resolved.

What I did?

I just make AJAX request to the id who’s contents I want to update after saving the data.

my code was




		  $.fn.yiiGridView.update("commentary-grid");



where "commentary-grid" is the section of page which I want to update.

Hopefully, someone might get help from it.

Thanks