GridView and ajax

I need send id(this is hidden) and myselect(is not in model) with ajax when I click on button go.

I used $.fn.yiiGridView.update but it not worked.

Help me Please.


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

	'id'=>'my-grid',

	'dataProvider'=>$model->search(),

	'ajaxUpdate'=>true,

	'filter'=>$model,

	'columns'=>array(

		'id'=>array(

			'name'=>'id',

			'type'=> 'raw',

			'value'=> '$data->id',

			'headerHtmlOptions'=>array('style'=>'width:0%; display:none'),

			'filterHtmlOptions'=>array('style'=>'width:0%; display:none'),

			'htmlOptions'=>array('style'=>'width:0%; display:none'),

		),

		'user_id'=>array(

			'name'=>'user',

			'header'=>'User Name',

			'value'=>'$data->user->username',

		),

		'created',

		array(

			'type'=>'raw',

			'name'=>'myselect',

			'value'=>"CHtml::radioButtonList('select_myselect','myselect',array(0=>'',1=>''),array(

 				'separator'=>'',

			))",

		),

		array(

		    'class'=>'CButtonColumn',

		    'template'=>'{go}',

		    'htmlOptions' =>array(

				'class'=>'button_go',

	    	),

		    'buttons'=>array(

				'go' => array (

					'label'=>'GO',

					'click'=>"function(){

						$.fn.yiiGridView.update('my-grid', {

							type:'POST',

							url:Yii::app()->createUrl('/my/index'),

							success:function(data) {

								$.fn.yiiGridView.update('my-grid');

							}

						})

					return false;

					} ",

				),

		    ),

		),

	),

));

Use afterAjaxUpdate:

http://www.yiiframework.com/doc/api/1.1/CGridView#afterAjaxUpdate-detail

It will work after ajax when I get data from controller? I can’t send data.

Can You explain me?

When I click on button go I want send id and data this row with ajax.

hi

see this link

My link