Wiki

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

Working with CGridView in Admin Panel

Created 11 months ago by vibhaJadwaniTutorials11 comments – viewed 31,101 times – ( +30 / -1 )
This is a tutorial for how to add input text-Field, check-box, buttons in CGridView.

Using CJuiDatePicker for CGridView filter

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

How to show ajax delete status in CGridView like flash messages

Created 2 years ago by hasanaviHow-tos9 comments – viewed 19,546 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())

Using standard filters in CGridView custom fields

Created 2 years ago by GOshaHow-tos4 comments – viewed 35,360 times – ( +15 )
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:

Update/delete model with CJuiDialog (works in CGridView)

Created about a year ago by ifdatticTutorials6 comments – viewed 32,207 times – ( +14 )
This is based on this article.

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 17,237 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...

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

Created about a year ago by JobloTips7 comments – viewed 22,641 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.

Using filters with CGridView and CArrayDataProvider

Created about a year ago by marcovtwoutHow-tos12 comments – viewed 25,699 times – ( +12 )
Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

Special $variables in CGridView and CListView

Created about a year ago by Steve FriedlTips8 comments – viewed 23,315 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: Update/create records in a CJuiDialog

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