Hi, friends
In my Cgridview contains dropDownlist. In dropdownlist,url, I want to be like this: index.php/order/ChangAction?order_id=120, but i tried code as show below, can’t get the order_id value. contrast, I got like this: index.php/order/ChangAction/
please help me.
thanks.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'order-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'created_date',
'order_id',
array(
'name'=>'customer_id',
'value'=>'Customers::model()->findByPk($data->customer_id)->customer_first_name." ".Customers::model()->findByPk($data->customer_id)->customer_last_name'
),
'order_status',
'address',
array(
'header'=>'Action',
'type'=>'raw',
'value'=>"CHtml::dropDownList('listname', '',
array('1' => 'Cancel', '2' => 'Reassign','3'=>'Hold'),
array('empty' => '(Action)','onchange'=>'js:alert($(this).val());',
'ajax'=>array(
'type' => 'GET',
'url' => Yii::app()->createUrl('order/ChangAction',array('order_id'=>$model->order_id)),
'data'=>'js:{clientId: $(this).val()}',
)),
array('class'=>'changeAcation')
)",
'htmlOptions'=>array('width'=>5),
),
),
)); ?>