Difference between #4 and #5 of
Using standard filters in CGridView custom fields

Revision #5 has been created by jwerner on Dec 20, 2010, 10:26:46 AM with the memo:

Modified formatting of 1st php block
« previous (#4)


Title unchanged

Using standard filters in CGridView custom fields

Category unchanged


Yii version unchanged

Tags unchanged

CGridView, interface, filters, search

Content changed

So we do the usual thing:

<?php $this->widget('zii.widgets.grid.CGridView', array(

), //..... ),
`Mii::getSwitch` - is my own helper witch returns `on` or `off` according to the current switch value (in the original it returns an image).
After that the user can see `on` and `off` values in the column, but he will not be able to filter columns typing `on` or `off` in the quicksearch field.
So we do the following thing in model `search()` function:
14 0
Viewed: 65 361 times
Version: 1.1
Category: How-tos
Written by: GOsha
Last updated by: jwerner
Created on: Dec 13, 2010
Last updated: 7 years ago
Update Article


View all history