Wiki

Articles tagged with "cgridview", sorted by commentsX
Displaying 51-60 of 65 result(s).

Search method of a model for filters when using dates - unixtimestamp in database

Created 4 years ago by MukkeTips1 comment – viewed 24,190 times – ( +10 ) – version 1.1
I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

Create custom button button with AJAX function in CGridView

Created 2 years ago by nkdHow-tos1 comment – viewed 39,813 times – ( +16 ) – version 1.1
CButtonColumn in CGridView can be customised to include user built buttons. To learn a great deal about including custom buttons, read this excellent wiki. This tutorial will show how to call an action from one custom button using AJAX instead of regular GET calls.

Limit a CGridView field to some preset length.

Created 2 years ago by le_topHow-tos1 comment – viewed 9,369 times – ( +13 ) – version 1.1
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.

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

Created 9 months ago by Louis GacTutorials1 comment – viewed 4,561 times – ( +5 ) – version 1.1
For each column of the CGridView, we can specify customized buttons : Customize Buttons in CGridWiew

View a related field in CGridView

Created 9 months ago by rafaelt88Tips1 comment – viewed 4,666 times – ( +6 ) – version 1.1
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".

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

Created 8 months ago by le_topTips1 comment – viewed 2,694 times – ( +1 ) – version 1.1
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.

Search a file size range in CGridView

Created about a year ago by CrazyCatTips0 comments – viewed 4,185 times – ( +2 )
Working on a report system of files transfert, I had to let the users simply find files by size. I didn't want to have two fields, I prefer a simple text input, with "human syntax".

Clear CGridView Filters, Sort & Pager

Created 4 months ago by le_topHow-tos0 comments – viewed 3,983 times – ( +2 ) – version 1.1
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.

checkBox in CGridview

Created 3 months ago by n-rOthers0 comments – viewed 3,524 times – version 1.1
some when you need to add checkbox in cgridview and change state of selected rows by additianal parameters. in view :

Display image on CGridView column and open a fancy-box

Created about a year ago by Ankit ModiTutorials0 comments – viewed 9,132 times – ( +1 / -1 )
1) Add a fancy-box extension on admin page