php - Can't add a CButtonColumn to CGridView -
I am trying to create a custom CGridView
column with the Delete button. I use the CArrayDataProvider
as a data container but nothing on the screen when I run the code below.
$ the-> widget (' Zii.widgets.grid.CgrridView ', array (' id '= & gt;' My-model-grid ',' dataProvider '= & gt; $ arrayDataProvider,' column '= & gt; array (' name ',' Email ', array (' class' = & gt; 'zii.widgets.grid.CButtonColumn',))));
If I delete this part:
array ('class' = & gt; 'zii.widgets.grid.CbuttonColumn',) < / Code>
This will work.
I am using CGridView
to CJuiTab
AJAX.
You can customize the button to 2 ways to remove the buttons you want to delete. ( Second (for more customization for links)
array ('class' = & gt; 'CBTToncolm', 'Button' = & gt; array (// Update 'Update' => Array ('url' => '$ this-> Grid-> Controller- & gt; createUrl ("/ Arrange / update", array ("id array ('url' => gtk-> $ this-> grid-> controller-> createUrl (" / / $; -> data- & Gt; primary key)) 'ADR (' url '=>' $ this- & gt; Grid- & gt; Controller- & gt; createUrl ("/ agreement / Contract) /delete/".$data->primaryKey)),),),
Comments
Post a Comment