multiple CActiveDataProviders in one CGridView
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?
There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?
CGridview displays existent rows of the table (using DataProvider)
Suppose you have an Application in Yii that manages hotels each one has many customers.
Clearing CGridView filters and sort orders from the web pages, is usefull for the end user. Yii does not seem to propose a standard method. Furthermore, this is especially usefull when filters are "remembered" in the user's session.
Assume that you have teachers and students model.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'dataProvider' => $dataprovider,
'id'=>'recipient_table',
'selectionChanged'=>'updateEditForm',
'columns' => array(
'rec_id',
'org.nachname',
'org.vorname',
'org_id',
array(
'class'=>'CButtonColumn',
'template'=>'{...
This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)
After of model update (successfull or not) throught CGridView (check the below link) you probably need to updates the specific row html in cgridview (not entire cgridview)
The problem is not new: after setting some filters in a grid (typically in admin view), and gone to another page, returning in the grid's page I would like to find the filters with previous setting mantained.