Create custom button button with AJAX function in CGridView
This will call the controller function using AJAX instead of redirecting the user to the url using GET parameters.
This will call the controller function using AJAX instead of redirecting the user to the url using GET parameters.
Lets say we have such a CGridView widget showing a list of users for administrator. Users have status „active“ or „disabled“. Grid widget puts class „odd“ or „even“ to rows and we want to preserve this. So we want to add a class „disabled“ to rows with disabled users.
<?php
$this->widget('zii.widgets.grid.CGridView', array(
'id'=>'user-grid',
'dat...
Assume that you have teachers and students model.
The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way **you can write columns grouping h...
Sometimes text inside a gridview column is just too long. That's why I figured out a way to make the column smaller while still providing the information.
Hi buddies !, This tutorial shows about how to add a custom button with your own icon for your CGridView of Yii framework
CGridview displays existent rows of the table (using DataProvider)
This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)
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.