Wiki

Articles tagged with "inputevaluate"X
Displaying 1-2 of 2 result(s).

Yii 1.1: Cgridview: Use Special Variable $Data In The Options Of A Button (I.e. Evaluate Options Attribute)

Created 6 months ago by Louis GacTutorials0 comments – viewed 3,265 times – ( +4 ) – version 1.1
For each column of the CGridView, we can specify customized buttons : Customize Buttons in CGridWiew

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created 2 years ago by c@cbaTutorials3 comments – viewed 41,516 times – ( +28 / -1 ) – version 1.1
    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this: 'value'=>'$data->author->username',.     Now we might want to use $data in the declaration of the htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...