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

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 3 years ago by xrxHow-tos17 comments – viewed 32,537 times – ( +23 ) – 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.

Using CJuiDatePicker for CGridView filter

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

How to show ajax delete status in CGridView like flash messages

Created 3 years ago by hasanaviHow-tos12 comments – viewed 33,213 times – ( +21 ) – 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 3 years ago by marcovtwoutHow-tos30 comments – viewed 46,467 times – ( +21 ) – version 1.1
Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

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 38,156 times – ( +28 / -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...

Displaying, sorting and filtering HasMany & ManyMany relations in CGridView

Created 2 years ago by yJeroenTutorials8 comments – viewed 40,717 times – ( +18 ) – version 1.1
This tutorial gives you multiple options of how to fully implement showing, sorting and filtering related data in gridviews.

Using standard filters in CGridView custom fields

Created 3 years ago by GOshaHow-tos4 comments – viewed 49,618 times – ( +17 ) – 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:

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

Created 2 years ago by Gerhard LiebenbergTutorials20 comments – viewed 61,436 times – ( +25 / -1 ) – version 1.1
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.

Special $variables in CGridView and CListView

Created 2 years ago by Steve FriedlTips10 comments – viewed 42,858 times – ( +25 / -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 34,475 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.