Difference between #2 and #3 of
How to Enhance a CGridView

Revision #3 has been created by bluyell on Apr 3, 2014, 7:52:14 PM with the memo:

adding new options
« previous (#2) next (#4) »

Changes

Title unchanged

How to Enhance a CGridView

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

CGridView custom

Content changed

[...]
'class'=>'EEditableColumn' (and its extra attributes)


```php
<?php
     Yii::import('application.extensions.eeditable.*');     
 
$grid_id = 'some-grid-view';      $this->widget('zii.widgets.grid.CGridView', array(          'id'=>$grid_id,          'dataProvider'=>$dataProvider,          'columns'=>array(              array('name'=>'firstname'),              array('name'=>'example_field',                  'class'=>'EEditableColumn', 'editable_type'=>'editbox',                  'action'=>array('/some/ajaxeditcolumn'),             ),
 
        ),
 
    
),
 
array('name'=>'example_field_2',
 
'class'=>'EEditableColumn', 'editable_type'=>'select',
 
'editable_options'=>
 
array(-1=>'--select--','1'=>'Yes','0'=>'No','3'=>'maybe!'),
 
'action'=>array('/some/ajaxeditcolumn'),
 
),
 
),
 
));      ?>

```

And this is the code required at server side to handle the change value event:
[...]
2 0
5 followers
Viewed: 6 894 times
Version: 1.1
Category: How-tos
Written by: bluyell
Last updated by: CeBe
Created on: Apr 2, 2014
Last updated: 4 years ago
Update Article

Revisions

View all history