Wiki

Articles tagged with "cgridview", sorted by commentsX
Displaying 21-30 of 39 result(s).

Displaying image in a CGridView column.

Created about a year ago by sirin kHow-tos5 comments – viewed 24,347 times – ( +12 / -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

CButtonColumn: Use special variable $data for the 'id' in the 'options' of a button

Created 9 months ago by bluezedTutorials5 comments – viewed 7,867 times – ( +6 )
In an application I had a CGridView with a CButtonColumn and for an Ajax-Request I needed to make sure that the IDs of the buttons would not change when the GridView was updated so in effect I wanted to link them to the $data->id. So I tried:

Change buttons on our CGridView extending yii

Created about a year ago by sensorarioTips4 comments – viewed 14,265 times – ( +9 )
In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).

Using standard filters in CGridView custom fields

Created 2 years ago by GOshaHow-tos4 comments – viewed 35,420 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:

Adding a link to a CDataColumn

Created 3 months ago by le_topTips4 comments – viewed 3,082 times – ( +3 )
Backoffice Grid Views often list information like Posts for a blog while showing at the same time linked information like the User who wrote that post. For more efficiency, it is appropriate that the User is displayed as a link to the User detail page.

Using CJuiDatePicker for CGridView filter

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

Keeping a running total in a CGridView

Created 2 years ago by Steve FriedlHow-tos3 comments – viewed 15,731 times – ( +21 )
This tip created in conjunction with IRC #yii channel users emilsedgh and tydeas - thanks!
tags: CGridView

Adding 'disabled' to CCheckBoxColumn and support for yiigridview.js

Created 7 months ago by Xgamer99Tips3 comments – viewed 4,357 times – ( +1 )
I recently had to have a checkbox column in my grid view that supported the 'disabled' attribute. This was easy enough to do by extending the CCheckBoxColumn. However, I also wanted the checkbox to be selected when clicking on the table's row (supported via CGridView's selectableRows option). I discovered I had to tweak yiigridview.js so that it would not select disabled rows when clicking on it or on the 'select all' checkbox.

Customize CGridView columns directly in your view

Created 10 months ago by clapasTips2 comments – viewed 10,180 times – ( +2 / -1 )
You usually take a model instance passed into your view to provide data to a CGridView in this way:

CGridView and AjaxForm Connect

Created 2 years ago by PinkBrainPlanHow-tos2 comments – viewed 14,347 times – ( +1 )
As I'm new to the framework (2 weeks) - I tried to build a functionallity I already use a lot in my old framework (PRADO). This means combining a GridView with a form. And this in one page, what allows you to select a record from the grid and view the values in the same page without jumping to a new page.
tags: Ajax, Form, CGridView