Wiki

Articles tagged with "cgridview", sorted by date (updated)X
Displaying 1-10 of 39 result(s).

Dynamic parent and child CGridView on single view. Using $.ajax to update child gridview via controller, after row in parent gridview was clicked.

Updated a day ago by Gerhard LiebenbergTutorials17 comments – viewed 29,301 times – ( +21 )
This wiki is a step-by-step example explaining how the controller, model and the view's CGridView work together. It explains simple things - as well as more complex things that you will anyway quickly have to know. So, even if you don't use dynamic gridviews, take a morning off and thoroughly work through this tutorial. It should save you lots of struggling.

CGridView. Add custom class to table rows preserving original „odd“ and „even“

Updated 15 days ago by Maug LeeHow-tos2 comments – viewed 1,551 times – ( +1 )
Lets say we have such a CGridView widget showing a list of users for administrator. Users have status „active“ or „disabled“. Grid widget puts class „odd“ or „even“ to rows and we want to preserve this. So we want to add a class „disabled“ to rows with disabled users.

Limit a CGridView field to some preset length.

Updated 2 months ago by le_topHow-tos1 comment – viewed 2,700 times – ( +9 )
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.

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

Updated 2 months ago by le_topTips0 comments – viewed 2,808 times – ( +5 )
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.

Searching and Sorting by Count of Related Items in CGridView

Updated 2 months ago by softarkHow-tos10 comments – viewed 16,954 times – ( +21 )
Let's say we have two models and relation between them:

CGridView: Render customized/complex datacolumns

Updated 3 months ago by JobloTips11 comments – viewed 61,454 times – ( +59 )
If you have to display a overview of related data in a table, you can use the CListView, create your view with table/tr/td tags and implement db-queries in the view to display detaildata of the current (master-)record.
tags: CGridView

Adding a date range search for CGridView the easy way

Updated 3 months ago by mikewalenTips2 comments – viewed 4,531 times – ( +7 )
After a lot of research, everything I found on adding date range searching to a CGridView advanced search form seemed to involve adding two new public variables (e.g. $date_from, $date_to), 'safe' rules for the new variables, and a rather chunky if/elseif/else check in the search() method. This probably isn't a hassle for most, but because many of the tables in my database contain two or three and sometimes four date columns (e.g. date_created, date_modified, date_deleted etc.), it meant I was having to add up to eight public variables, the corresponding safe rules, and modifying the search() criteria for each date attribute. So, I set about creating a better way and I thought I'd share my work with the community.

Adding a link to a CDataColumn

Updated 3 months ago by le_topTips4 comments – viewed 3,059 times – ( +3 )
Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

Filter / Search with CListView

Updated 4 months ago by JohnPollardHow-tos6 comments – viewed 18,540 times – ( +21 )
This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

Using CJuiDatePicker for CGridView filter

Updated 5 months ago by softarkHow-tos3 comments – viewed 16,564 times – ( +17 )
We can use a CJuiDatePicker for a CGridView inline filter.