This is a shortcut for adding a text search for multiple values i.e.
This is a shortcut for adding a text search for multiple values i.e.
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.
For example:
We have a record in a database with field switch
having 0 or 1 values.
After that we want a user to see on
or off
instead 1 or 0.
So we do the usual thing:
<?php $this->widget('zii.widgets.grid.CGridView', array(
//.....
array(
'name'=>'...
Suppose you have an Application in Yii that manages hotels each one has many customers.
This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.
class Post extends CActiveRecord {
...
}
`
When you list Authors in grid you would like to print the count of posts in column, allow sorting on this column and probably filtering by the count.