Wiki

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

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 3 years ago by xrxHow-tos14 comments – viewed 29,616 times – ( +22 ) – version 1.1
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.

How to show ajax delete status in CGridView like flash messages

Created 2 years ago by hasanaviHow-tos12 comments – viewed 29,169 times – ( +20 ) – version 1.1
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())

Using filters with CGridView and CArrayDataProvider

Created 2 years ago by marcovtwoutHow-tos30 comments – viewed 39,901 times – ( +20 ) – version 1.1
Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

Using CJuiDatePicker for CGridView filter

Created 2 years ago by softarkHow-tos12 comments – viewed 27,493 times – ( +19 ) – version 1.1
We can use a CJuiDatePicker for a CGridView inline filter.

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

Created 2 years ago by c@cbaTutorials3 comments – viewed 31,946 times – ( +25 / -1 ) – version 1.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...

Using standard filters in CGridView custom fields

Created 3 years ago by GOshaHow-tos4 comments – viewed 45,461 times – ( +16 ) – version 1.1
In this article I'll try to explain how to use standard quick search fields in CGridView with customized columns.For example: We have a record in a database with field switch having 0 or 1 values. After that we want a user to see on or off instead 1 or 0. So we do the usual thing:

Special $variables in CGridView and CListView

Created 2 years ago by Steve FriedlTips10 comments – viewed 36,980 times – ( +23 / -1 ) – version 1.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 2 years ago by JobloTips7 comments – viewed 31,096 times – ( +15 ) – version 1.1
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.

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created about a year ago by yJeroenTutorials8 comments – viewed 34,767 times – ( +15 ) – version 1.1
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

Update/delete model with CJuiDialog (works in CGridView)

Created 2 years ago by ifdatticTutorials6 comments – viewed 48,862 times – ( +15 ) – version 1.1
This is based on this article.