Wiki

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

Limit a CGridView field to some preset length.

Updated about a month ago by le_topHow-tos1 comment – viewed 2,229 times – ( +8 )
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 about a month ago by le_topTips0 comments – viewed 2,251 times – ( +3 )
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 about a month ago by softarkHow-tos10 comments – viewed 16,012 times – ( +21 )
Let's say we have two models and relation between them:

CGridView: Render customized/complex datacolumns

Updated 2 months ago by JobloTips7 comments – viewed 56,926 times – ( +55 )
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 2 months ago by mikewalenTips2 comments – viewed 3,566 times – ( +5 )
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 2 months ago by le_topTips3 comments – viewed 2,613 times – ( +2 )
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 3 months ago by JohnPollardHow-tos5 comments – viewed 17,440 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 4 months ago by softarkHow-tos3 comments – viewed 15,399 times – ( +16 )
We can use a CJuiDatePicker for a CGridView inline filter.

How to show ajax delete status in CGridView like flash messages

Updated 4 months ago by adlersdHow-tos9 comments – viewed 18,540 times – ( +16 )
I've seen many tickets regarding how to show friendly delete confirmation using CGridView's CButtonColumn in ajax request. If you are using relational database, after producing CRUD functionality when you try to delete a record in ajax mode which has child record it can't be deleted and you can see the ajax loader forever. By this way you can't show the users if a record has been successfully deleted or if there are some problem in flash style (setFlash() / getFlash())