Wiki

Articles tagged with "cgridview", sorted by viewsX
Displaying 11-20 of 38 result(s).

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 2 years ago by xrxHow-tos13 comments – viewed 22,246 times – ( +20 )
Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

Special $variables in CGridView and CListView

Created about a year ago by Steve FriedlTips8 comments – viewed 21,895 times – ( +18 / -1 )
The popular CListView and CGridView widgets each take a data provider and iterate over each data object produced, calling the user's code to render each row one at a time, and most are familiar with the use of the $data variable to represent the current model object or array.

CGridView: Display the full record (actionView) in a CJuiDialog

Created about a year ago by JobloTips7 comments – viewed 21,655 times – ( +13 )
If you show a model (with a lot of attributes) partially in a CGridView, it can be helpful when the user can take a quick look at the full record with all attributes without displaying the view as a page and afterwards returning back to the gridview.

CGridView: Update/create records in a CJuiDialog

Created about a year ago by JobloTips10 comments – viewed 21,097 times – ( +11 )
My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

Using CJuiDialog to edit rows in a CGridView

Created about a year ago by Russell EnglandTips7 comments – viewed 18,729 times – ( +2 / -1 )
I have a CGridView with a list of clients/events. For each row (EventClient) I wanted a quick edit dialog.

How to show ajax delete status in CGridView like flash messages

Created about a year ago by hasanaviHow-tos9 comments – viewed 18,651 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())

Filter / Search with CListView

Created about a year ago by JohnPollardHow-tos5 comments – viewed 17,600 times – ( +21 )
This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

Creating a jQueryUI Sortable CGridView

Created about a year ago by blindMoeHow-tos13 comments – viewed 17,020 times – ( +35 )
I have had to do this a couple of times now so I figured I would share it with the community. I am going to keep this short because I really hope that you are familiar with jQueryUI's Sortable class before starting this tutorial.

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created 8 months ago by yJeroenTutorials8 comments – viewed 16,388 times – ( +11 )
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

CGridView: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created about a year ago by c@cbaTutorials0 comments – viewed 16,184 times – ( +20 / -1 )
    For each column of the CGridView, we can specify name, value, htmlOptions, cssClassExpression etc. In the declarations of the attributes value and cssClassExpression we can use the "special" variable $data, for example like this: 'value'=>'$data->author->username',.     Now we might want to use $data in the declaration of the htmlOptions attribute, which is normally not possible, to generate for example the tag <td id="3" class="name_3">, where 3 is the id of the data model for the current row, i.e. $data->id. That is, we want to be able to use: 'htmlOptions'=>array('id'=>'$data->id', 'class'=>'"name_{$data->id}"')     Here's a way to accomplish this...