Checkboxhtmloptions And Onchange Function Input Value




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

	'id'=>'complaint-grid',

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

	'filter'=>$model,

	

	'columns'=>array(

		array(

		'id'=>'Complaint_ID',

                'class'=>'CCheckBoxColumn',

		

			'checkBoxHtmlOptions' =>array('onchange'=>'hello1(this.value, second value)'),

			'value'=>'Complaint::model()->getStatusId1($data->Complaint_ID)',

                ),



how use $data->Complaint_ID in place of second value,

Please Help.

Thanks In advance

Is ‘checkBoxHtmlOptions’ actually a thing? Should it be ‘htmlOptions’?

p.s. Are you getting an error and/or what is it?

First of all thanks for reply ‘jkofsky’.

so i all ready tried ‘htmlOptions’.

at that time i’m getting this,

1)if i am use =


array('onchange'=>'hello1($data->Complaint_ID)'),

getting this error=>

SyntaxError: syntax error

hello1($data->Complaint_ID)

2)if i am use =


array('onchange'=>'hello1("$data->Complaint_ID")'),

i am not getting any error but, instead of value i get printed $data->Complaint_ID.

  1. even ‘this.value’ is not working in htmlOptions, so i use checkBoxHtmlOptions.

Having not used the CheckBoxList, I didn’t recognize checkBoxHtmlOptions.

As for ‘onClick’ I’m out of my depth…Sorry :(