Wiki

Articles tagged with "cgridview", sorted by viewsX
Displaying 1-10 of 65 result(s).

Using CButtonColumn to customize buttons in CGridView

Created 7 years ago by TrejderHow-tos19 comments – viewed 293,762 times – ( +101 / -1 ) – version 1.1
CGridView is a one of most flexible widgets in Yii and example its flexibility is CButtonColumn used to build buttons for steering model in each grid row. Here in this how-to we will explain ways user can customize CButtonColumn to flexibly fit it to its needs.

Searching and sorting by related model in CGridView

Created 6 years ago by Maciej LiżewskiTutorials86 comments – viewed 201,588 times – ( +126 / -1 ) – version 1.1
Lets say we have two models and relation between them:

CGridView: Render customized/complex datacolumns

Created 6 years ago by JobloTips13 comments – viewed 153,707 times – ( +74 / -1 ) – 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, CListView and CActiveDataProvider

Created 5 years ago by softarkTutorials22 comments – viewed 122,891 times – ( +46 / -1 ) – version 1.1
CGridView (or CListView) together with CActiveDataProvider is a very powerful combination of the built-in tools of Yii. But how do they work together to accomplish their fantastic functions? And what are you expected to do to use them and to customize their behaviors? This article explains the very basics of them.

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

Created 5 years ago by Gerhard LiebenbergTutorials20 comments – viewed 94,594 times – ( +28 / -2 ) – 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.

Working with CGridView in Admin Panel

Created 5 years ago by vibhaJadwaniTutorials18 comments – viewed 79,539 times – ( +44 / -2 ) – version 1.1
This is a tutorial for how to add input text-Field, check-box, buttons in CGridView.

Using filters with CGridView and CArrayDataProvider

Created 6 years ago by marcovtwoutHow-tos33 comments – viewed 74,615 times – ( +23 / -1 ) – version 1.1
Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

Update/delete model with CJuiDialog (works in CGridView)

Created 6 years ago by ifdatticTutorials6 comments – viewed 68,785 times – ( +15 / -1 ) – version 1.1
This is based on this article.

Special $variables in CGridView and CListView

Created 6 years ago by Steve FriedlTips11 comments – viewed 65,675 times – ( +27 / -3 ) – 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: Use special variable $data in the htmlOptions of a column (i.e. evaluate htmlOptions attribute)

Created 5 years ago by c@cbaTutorials3 comments – viewed 65,240 times – ( +28 / -2 ) – 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...