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

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: 11 998 times
Version: 1.1
Category: How-tos
Written by: bluyell
Last updated by: CeBe
Created on: Apr 2, 2014
Last updated: 10 years ago
Update Article

Revisions

View all history