Is there a way for user to update the CGridView information at the panel?? Mean that the CGridView info is editable and user can modify the info directly and click button save …
Is there any solution for this problem? Thank… XD
Is there a way for user to update the CGridView information at the panel?? Mean that the CGridView info is editable and user can modify the info directly and click button save …
Is there any solution for this problem? Thank… XD
i did not try it but there is one extension you can check - http://www.yiiframework.com/extension/editablegridview
thank mdomba… Will start looking on it now. XD
Hi,
about the editablegridview extension, anyone try do it before? I got an error mention
Alias "zii.widgets.grid.CEditableGridView" is invalid. Make sure it points to an existing PHP file.
i already extract the file under folder protected/extension but it still got error. Can anyone tell me how to solve this problem?
Thank.
Hi Jowen,
Put the class files in Yii\framework\zii\grid\ and try, you wont get this error.
Thank tad,
but now got another error say
PHP Error
include(C:\phptest\protected\extensions\CEditableColumn.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory
That CEditableColumn.php file i need put at which location?? I try put the CEditableColumn.php under files in Yii\framework\zii\grid\ but got this error.
Thank again.
It works for me under grid folder. Have you mentioned include statement in any of the files with the above url?
<?php
$this->widget('zii.widgets.grid.CEditableGridView', array(
'dataProvider' => $model->search(),
'showQuickBar' => 'true',
'quickCreateAction' => 'QuickCreate', // will be actionQuickCreate()
'columns' => array(
'machine_id',
'model',
'serial_no', // display the 'title' attribute
array('header' => 'editMe', 'name' => 'editable_row', 'class' => 'CEditableColumn')
)));
?>
<?php
i put this in view. then it get error when i run it.
PHP Error
include(C:\phptest\protected\extensions\CEditableColumn.php) [<a href=‘function.include’>function.include</a>]: failed to open stream: No such file or directory
‘name’ should be your attribute name and not editable_row
Thank Tad,
U solve my problem… XD. But the view not really nice after i add in view, update and delete icon. Plus i also using EButtonColumnWithClearFilters. The icon view more messy.
Thank again. XD
hi guy,
The ActionQuickCreate function cant work and it cant save into my database… Nothing change after i fill the blank and click + button.
$this->widget('zii.widgets.grid.CEditableGridView', array(
'dataProvider'=>$dataProvider,
'showQuickBar'=>'true',
'quickCreateAction'=>'QuickCreate', // will be actionQuickCreate()
'columns'=>array(
'title', // display the 'title' attribute
array('header' => 'editMe', 'name' => 'editable_row', 'class' => 'CEditableColumn')
));
}
About the ‘dataProvider’=>$dataProvider and ‘dataProvider’=>$model->search(), which one i suppose to use?
if i using ‘dataProvider’=>$dataProvider, i need to declare the identify $dataProvider at where?
Please help… THX. XD
thank i will try it.
hi, nice post.and helped in many problems.and one more doubt how to add dropdown list instead of textfield where ever i want.please reply as soon as possible.
[color="#2E8B57"]how to update some specific column using editablegridview?
how to use dropdown values for specific column in this extension?
thanx in advance.
[/color]
You can also check x-editable extension - I used the EditableDetailView and it is pretty complete/configureable.