Showing 1-14 of 14 items.

Adding a date range search for CGridView the easy way

Created 13 years ago by mikewalen mikewalen, updated 12 years ago by mikewalen mikewalen. 6 comments
  1. Create an Active Record Behavior that builds the criteria for the search() method and attach it to your model
  2. Modify the search() method of the model to merge the behavior's criteria in with the rest of the searchable attributes
  3. Modify the _search form view to add the date range inputs
6 0
11
Viewed: 46 329 times
Version: 1.1
Category: Tips

CGridView, CListView and CActiveDataProvider

Created 14 years ago by softark softark, updated 13 years ago by softark softark. 22 comments

CGridView (or CListView) together with CActiveDataProvider is a very powerful combination of the built-in tools of Yii. But how do they work together to accomplish their fantastic functions? And what are you expected to do to use them and to customize their behaviors? This article explains the very basics of them.

26 0
33
Viewed: 151 914 times
Version: 1.1
Category: Tutorials

Using standard filters in CGridView custom fields

Created 15 years ago by GOsha GOsha, updated 15 years ago by jwerner jwerner. 4 comments

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'=>'...
14 0
16
Viewed: 79 264 times
Version: 1.1
Category: How-tos

Adding Yii Search to Your Browser Search Box

Created 15 years ago by qiang qiang, updated 8 years ago by CeBe CeBe. 1 comment

The official Yii project site now supports OpenSearch. This means you can customize your browser's search box to enable direct search of the content in yiiframework.com. For example, by entering a Yii class name in the browser's search box, the corresponding class API page will be shown in the browser.

25 0
6
Viewed: 71 545 times
Version: all
Category: Tips