Wiki articles tagged with "CGridView"

Showing 1-20 of 65 items.

Search scenario (CGridView, etc.): avoid default values from database as search condition.

Created 9 years ago by le_top, updated 9 years ago by le_top.

Yii has a neat "trick" that will assign default values to new CActiveRecords. When performing a search() though, this is pretty annoying as they automatically apply as filter values.

1 0
2 followers
Viewed: 10 992 times
Version: 1.1
Category: Tips

Search a file size range in CGridView

Created 10 years ago by CrazyCat, updated 10 years ago by CrazyCat.
  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
2 0
2 followers
Viewed: 11 659 times
Version: Unknown (update)
Category: Tips

How to keep filters simple in CGridView

Created 9 years ago by Peppe, updated 9 years ago by le_top.

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.

0 0
2 followers
Viewed: 12 800 times
Version: 1.1
Category: How-tos

Saving CGridView filter

Created 10 years ago by sefburhan, updated 9 years ago by CeBe.

In this tutorial we will try to save cgridview filter(search) with title etc. basically we want to save two forms data i.e one represents filters and other data about filters like title, description etc. You can define your own structure for filter saving table here are some basic steps

1 0
31 followers
Viewed: 13 385 times
Version: 1.1
Category: Tutorials

Advanced CGridview issues - custom button using php and html

Created 9 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by Kostas Apazidis (KonApaz).

This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)

1 0
2 followers
Viewed: 13 511 times
Version: 1.1
Category: How-tos

CGridView: Adding behaviors from configuration, and template items from behaviors to CGridView

Created 10 years ago by le_top, updated 10 years ago by le_top.

Changing the way a CGridView is rendered from the configuration file, or through behaviors specified at the moment it is used, is handy to extend a CGridView without creating tons of different classes for it. I am surprised that this is not in the default implementation, so I made my default CGridView implementation.

3 0
3 followers
Viewed: 14 770 times
Version: 1.1
Category: Tips

How to Display tooltp(qtip) on CGridview dynamic

Created 10 years ago by Ankit Modi, updated 10 years ago by softark.

Hi Friends,

0 0
4 followers
Viewed: 15 699 times
Version: Unknown (update)
Category: Tips

CGridView keep focus on the control after filtering

Created 12 years ago by jayala, updated 12 years ago by jayala.

You can find the reason why I wrote this article here.

5 0
10 followers
Viewed: 16 980 times
Version: 1.1
Category: How-tos

Insert a model record using CGridview

Created 9 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by Kostas Apazidis (KonApaz).

CGridview displays existent rows of the table (using DataProvider)

2 0
1 follower
Viewed: 17 478 times
Version: 1.1
Category: How-tos

Display image on CGridView column and open a fancy-box

Created 10 years ago by Ankit Modi, updated 10 years ago by Ankit Modi.

1) Add a fancy-box extension on admin page

0 0
2 followers
Viewed: 17 799 times
Version: Unknown (update)
Category: Tutorials

Multi Data Provider

Created 10 years ago by Sharon Lavie, updated 8 years ago by Sharon Lavie.

Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).

1 0
4 followers
Viewed: 18 270 times
Version: 1.1
Category: Tips

two or more different collected data in one CGridView

Created 10 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by CeBe.

Assume that you have teachers and students model.

2 1
6 followers
Viewed: 18 288 times
Version: 1.1
Category: How-tos

View a related field in CGridView

Created 9 years ago by rafaelt88, updated 8 years ago by rafaelt88.

Generally we need to show one or more fields from a model that is related to another model used in CGridView. For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".

2 0
3 followers
Viewed: 18 623 times
Version: 1.1
Category: Tips

Clear CGridView Filters, Sort & Pager

Created 9 years ago by le_top, updated 9 years ago by le_top.

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.

2 0
3 followers
Viewed: 18 648 times
Version: 1.1
Category: How-tos

CGridView customized CCheckBoxColumn

Created 10 years ago by chandran, updated 9 years ago by CeBe.

Hi friends,

3 0
6 followers
Viewed: 19 796 times
Version: 1.1
Category: Tips

CGridView Date Range Without Cookies or Session (External Filtering)

Created 10 years ago by ezekielnoob, updated 9 years ago by ezekielnoob.

Here's a tutorial on how to create a CGridView with external date filters the trick is to create hidden columns within the CGridView Filters something like in the example below: grid

3 0
8 followers
Viewed: 21 111 times
Version: 1.1
Category: How-tos

Display Status image on CGridView column

Created 10 years ago by Ankit Modi, updated 5 years ago by samdark.

How to display status image on admin gridview.

0 0
5 followers
Viewed: 21 126 times
Version: 1.1
Category: Tutorials

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 11 years ago by Xgamer99, updated 11 years ago by Maurizio Domba Cerin.

I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it o...

1 0
7 followers
Viewed: 21 295 times
Version: 1.1
Category: Tips

Limit a CGridView field to some preset length.

Created 11 years ago by le_top, updated 10 years ago by le_top.

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.

9 0
9 followers
Viewed: 22 147 times
Version: 1.1
Category: How-tos

Yii 1.1: Cgridview: Use Special Variable $Data In The Options Of A Button (I.e. Evaluate Options Attribute)

Created 9 years ago by Louis Gac, updated 9 years ago by Louis Gac.

Let's take the example of the above article to display an email button next to a delete button:

3 0
4 followers
Viewed: 22 171 times
Version: 1.1
Category: Tutorials