Wiki

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

Displaying image in a CGridView column.

Created 2 years ago by sirin kHow-tos5 comments – viewed 47,575 times – ( +13 / -1 ) – version 1.1
This is a simple example of how we can display images in CGridviews.Imagine that you have an image field in your table ie either a location field or a blob type field used to store the images.
tags: CGridView, image

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 66,394 times – ( +26 / -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.

Searching and Sorting by Count of Related Items in CGridView

Created 2 years ago by softarkHow-tos14 comments – viewed 31,608 times – ( +30 ) – version 1.1
Let's say we have two models and relation between them:

Using CJuiDatePicker for CGridView filter

Created 2 years ago by softarkHow-tos13 comments – viewed 34,931 times – ( +23 ) – 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 41,732 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...

CGridView keep focus on the control after filtering

Created 2 years ago by jayalaHow-tos2 comments – viewed 7,963 times – ( +6 ) – 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 31,715 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 3 years ago by sensorarioTips5 comments – viewed 24,144 times – ( +11 ) – 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 3 years ago by redguyTutorials75 comments – viewed 132,827 times – ( +117 ) – version 1.1
Lets say we have two models and relation between them:

CGridView: Render customized/complex datacolumns

Created 3 years ago by JobloTips13 comments – viewed 118,479 times – ( +73 ) – 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