Wiki

Articles tagged with "cgridview"X
Displaying 41-50 of 62 result(s).

Using CJuiDatePicker for CGridView filter

Created 2 years ago by softarkHow-tos12 comments – viewed 29,933 times – ( +20 ) – 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 35,463 times – ( +27 / -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...

CGridView keep focus on the control after filtering

Created 2 years ago by jayalaHow-tos2 comments – viewed 7,275 times – ( +5 ) – version 1.1
You can find the reason why I wrote this article here.
tags: CGridView, filter

Exporting CGridView results to CSV file

Created 2 years ago by RusAlexTutorials9 comments – viewed 27,705 times – ( +6 / -3 ) – version 1.1
A few days ago, i worked for CGridView exporting functional for my client. He asked me to create a simple exporting to a CSV file a CGridView search results.
tags: cgridview, export, csv

Change buttons on our CGridView extending yii

Created 2 years ago by sensorarioTips5 comments – viewed 22,237 times – ( +10 ) – version 1.1
In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).

Searching and sorting by related model in CGridView

Created 2 years ago by redguyTutorials72 comments – viewed 116,117 times – ( +108 ) – version 1.1
Lets say we have two models and relation between them:

CGridView: Render customized/complex datacolumns

Created 2 years ago by JobloTips13 comments – viewed 106,493 times – ( +71 ) – version 1.1
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

CGridView: Update/create records in a CJuiDialog

Created 2 years ago by JobloTips11 comments – viewed 34,656 times – ( +14 ) – version 1.1
My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

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

Created 2 years ago by JobloTips7 comments – viewed 32,977 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.

Special $variables in CGridView and CListView

Created 2 years ago by Steve FriedlTips10 comments – viewed 40,326 times – ( +24 / -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.