Wiki articles tagged with "CGridView"

Showing 1-20 of 65 items.

Using CButtonColumn to customize buttons in CGridView

Created 13 years ago by Trejder, updated 11 years ago by Gismo.

The easiest way to customize look and behaviour of them is to use series of CButtonColumn properties, like: updateButtonImageUrl (path to image for update button), updateButtonLabel (label for the update button; not HTML-encoded), updateButtonOptions (HTML options for this button, used in the way as many htmlOptions property for many widgets) and updateButtonUrl (a PHP expresion th...

75 0
59 followers
Viewed: 344 659 times
Version: 1.1
Category: How-tos

Using standard filters in CGridView custom fields

Created 13 years ago by GOsha, updated 13 years ago by jwerner.

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:

<?php $this->widget('zii.widgets.grid.CGridView', array(
//.....
array(
    'name'=>'...
14 0
16 followers
Viewed: 74 064 times
Version: 1.1
Category: How-tos

Search method of a model for filters when using dates - unixtimestamp in database

Created 13 years ago by Mukke, updated 12 years ago by jwerner.

I ran into a problem and on irc we worked it out. Since there is a lack on information on filters in genral i thought i'd start sharing all my findings, might be usefull for other people.

10 0
11 followers
Viewed: 37 241 times
Version: 1.1
Category: Tips

Keeping a running total in a CGridView

Created 13 years ago by Steve Friedl, updated 12 years ago by tydeas_dr.

This tip created in conjunction with IRC #yii channel users emilsedgh and tydeas - thanks!

22 0
19 followers
Viewed: 41 665 times
Version: 1.1
Category: How-tos
Tags: CGridView

CGridView and AjaxForm Connect

Created 13 years ago by PinkBrainPlan, updated 13 years ago by PinkBrainPlan.

<?php $this->widget('zii.widgets.grid.CGridView', array(

'dataProvider' => $dataprovider,
'id'=>'recipient_table',
    'selectionChanged'=>'updateEditForm',
'columns' => array(
	'rec_id',
            'org.nachname',
            'org.vorname',
            'org_id',
            array(
                'class'=>'CButtonColumn',
                'template'=>'{...
1 0
10 followers
Viewed: 27 413 times
Version: 1.1
Category: How-tos

Avoiding rendering entire page when using CGridView and CListView via AJAX

Created 13 years ago by xrx, updated 11 years ago by xrx.

Since I used CGridView for a first time, I didn't like how it handled operations like sorting, filtering, changing page and etc using AJAX.

23 0
29 followers
Viewed: 51 614 times
Version: 1.1
Category: How-tos

Using CJuiDialog to edit rows in a CGridView

Created 12 years ago by Russell England, updated 12 years ago by Russell England.

I used Zaccarias excellent article as the base http://www.yiiframework.com/wiki/145/cjuidialog-for-create-new-model/

Solution

First follow the wiki above to create all the required code. Then make the following modifications in your...

3 1
11 followers
Viewed: 41 367 times
Version: 1.1
Category: Tips

How to show ajax delete status in CGridView like flash messages

Created 12 years ago by hasanavi, updated 11 years ago by adlersd.

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 dele...

17 0
30 followers
Viewed: 56 063 times
Version: 1.1
Category: How-tos

Update/delete model with CJuiDialog (works in CGridView)

Created 12 years ago by ifdattic, updated 12 years ago by ifdattic.

This tutorial will show you how to create Ajax dialog which allows to create new model, update or delete existing model. It works with simple links, CGridView button column links, adds a minimal amount of code and degrades gracefully with JavaScript turned off.

15 0
25 followers
Viewed: 77 052 times
Version: 1.1
Category: Tutorials

Filter / Search with CListView

Created 12 years ago by JohnPollard, updated 11 years ago by JohnPollard.

This is what I did. Its the EASIEST solution that I know of. I just reused the advanced search done in CGridView.

22 0
26 followers
Viewed: 55 315 times
Version: 1.1
Category: How-tos

Using filters with CGridView and CArrayDataProvider

Created 12 years ago by marcovtwout, updated 10 years ago by yugene.

Using filters on CGridView with CActiveDataProvider is easy, but with CArrayDataProvider it is a bit tricky.

19 0
29 followers
Viewed: 92 835 times
Version: 1.1
Category: How-tos

Creating a jQueryUI Sortable CGridView

Created 12 years ago by blindMoe, updated 11 years ago by rAWTAZ.

I have had to do this a couple of times now so I figured I would share it with the community. I am going to keep this short because I really hope that you are familiar with jQueryUI's Sortable class before starting this tutorial.

36 0
54 followers
Viewed: 52 208 times
Version: 1.1
Category: How-tos

Special $variables in CGridView and CListView

Created 12 years ago by Steve Friedl, updated 12 years ago by Steve Friedl.

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.

23 1
33 followers
Viewed: 77 260 times
Version: 1.1
Category: Tips
14 0
20 followers
Viewed: 77 221 times
Version: 1.1
Category: Tips

CGridView: Update/create records in a CJuiDialog

Created 12 years ago by Joblo, updated 11 years ago by Joblo.

My article Display the full record in a CJuiDialog uses ajax to view a record in dialog on clicking the 'view-icon'.

12 0
26 followers
Viewed: 57 532 times
Version: 1.1
Category: Tips

CGridView: Render customized/complex datacolumns

Created 12 years ago by Joblo, updated 11 years ago by Joblo.

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.

53 0
74 followers
Viewed: 168 144 times
Version: 1.1
Category: Tips
Tags: CGridView

Searching and sorting by related model in CGridView

Created 12 years ago by Maciej Liżewski, updated 9 years ago by Kostas Apazidis (KonApaz).

Lets say we have two models and relation between them:

77 0
93 followers
Viewed: 273 324 times
Version: 1.1
Category: Tutorials

Change buttons on our CGridView extending yii

Created 12 years ago by sensorario, updated 11 years ago by sensorario.

In this tip, I'll help you to change in few second buttons of your CGridView. I hope you like it =).

9 0
9 followers
Viewed: 35 851 times
Version: 1.1
Category: Tips

Exporting CGridView results to CSV file

Created 12 years ago by RusAlex, updated 12 years ago by RusAlex.

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.

6 3
18 followers
Viewed: 69 418 times
Version: 1.1
Category: Tutorials

CGridView keep focus on the control after filtering

Created 12 years ago by jayala, updated 12 years ago by jayala.

You can find the reason why I wrote this article here.

5 0
10 followers
Viewed: 17 006 times
Version: 1.1
Category: How-tos