Hi there I have an arror trying to implemente de CEditableGridView
This is the error:
The property "CArrayDataProvider"."modelClass" is undefined.
C:\xampp\htdocs\svur\protected\extensions\CEditableGridView.php(51)
Yii::import(‘zii.widgets.grid.CGridView’);
41 Yii::import(‘application.extensions.CEditableColumn’);
42 Yii::import(‘application.extensions.Relation’);
43
44 class CEditableGridView extends CGridView {
45 public $showQuickBar=1;
46 public $quickCreateAction=‘QuickCreate’;
47 public $quickUpdateAction=‘QuickUpdate’;
48 public $addButtonValue=’+’;
49
50 public function renderQuickBar() {
51 printf (’<form method=“post” action=“index.php?r=%s/%s”>’,$this->dataProvider->modelClass,$this->quickCreateAction);
52 echo "<tr>";
53 foreach($this->columns as $column)
And in de _form.php in update action
…
$dataProvider = new CArrayDataProvider(‘Pagare’);
$dataProvider->setData($cotizacion->pagares);
$this->widget('CEditableGridView', array(
'id'=>'pagares-grid',
'dataProvider'=>$dataProvider,
'showQuickBar'=>'true',
'quickCreateAction'=>'modifiedPagare', // will be actionQuickCreate()
'columns'=>array(
'id',
'numero_pago',
'tipo_movimiento',
array('header'=>'importe','name'=>'importe', 'class'=>'CEditableColumn'),
//array('header'=>'fecha_vencimiento','name'=>'fecha_vencimiento', 'class'=>'CEditableColumn'),
'concepto_movimiento',
'cotizacion_id',
),
));
…
I will apreciate your response.
Thank in advance!.