Wiki articles in category How-tos tagged with "CGridView"

Showing 1-20 of 29 items.

How to keep filters simple in CGridView

Created 9 years ago by Peppe, updated 9 years ago by le_top.

The problem is not new: after setting some filters in a grid (typically in admin view), and gone to another page, returning in the grid's page I would like to find the filters with previous setting mantained.

0 0
2 followers
Viewed: 12 829 times
Version: 1.1
Category: How-tos

Advanced CGridview issues - custom button using php and html

Created 9 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by Kostas Apazidis (KonApaz).

This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)

1 0
2 followers
Viewed: 13 547 times
Version: 1.1
Category: How-tos

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 008 times
Version: 1.1
Category: How-tos

Insert a model record using CGridview

Created 9 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by Kostas Apazidis (KonApaz).

CGridview displays existent rows of the table (using DataProvider)

2 0
1 follower
Viewed: 17 519 times
Version: 1.1
Category: How-tos

two or more different collected data in one CGridView

Created 10 years ago by Kostas Apazidis (KonApaz), updated 10 years ago by CeBe.

Assume that you have teachers and students model.

2 1
6 followers
Viewed: 18 354 times
Version: 1.1
Category: How-tos

Clear CGridView Filters, Sort & Pager

Created 9 years ago by le_top, updated 9 years ago by le_top.

Clearing CGridView filters and sort orders from the web pages, is usefull for the end user. Yii does not seem to propose a standard method. Furthermore, this is especially usefull when filters are "remembered" in the user's session.

2 0
3 followers
Viewed: 18 690 times
Version: 1.1
Category: How-tos

CGridView Date Range Without Cookies or Session (External Filtering)

Created 10 years ago by ezekielnoob, updated 9 years ago by ezekielnoob.

Here's a tutorial on how to create a CGridView with external date filters the trick is to create hidden columns within the CGridView Filters something like in the example below: grid

3 0
8 followers
Viewed: 21 147 times
Version: 1.1
Category: How-tos

Limit a CGridView field to some preset length.

Created 11 years ago by le_top, updated 11 years ago by le_top.

Sometimes text inside a gridview column is just too long. That's why I figured out a way to make the column smaller while still providing the information.

9 0
9 followers
Viewed: 22 229 times
Version: 1.1
Category: How-tos

Update specific cgridview html row after AJAX request

Created 9 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by Kostas Apazidis (KonApaz).

After of model update (successfull or not) throught CGridView (check the below link) you probably need to updates the specific row html in cgridview (not entire cgridview)

1 0
2 followers
Viewed: 23 384 times
Version: 1.1
Category: How-tos

Update CGridview row separately using ajax request

Created 9 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by Kostas Apazidis (KonApaz).

There are cases you want to update a record on CGridview directly

5 0
8 followers
Viewed: 25 075 times
Version: 1.1
Category: How-tos

Insert a multirow header in CGridView

Created 10 years ago by Peppe, updated 9 years ago by Peppe.

The CGridView widget is very useful and customizable, but sometimes you need a little more. One limit I found is to have only one row for headers; yes, you can write each column header in more than one row, but just inside the single cell. I was looking instead for the possibility to use more than one row, with different structure one from the others. This way **you can write columns grouping h...

4 0
5 followers
Viewed: 27 260 times
Version: 1.1
Category: How-tos

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

How to avoid rendering entire page on AJAX call for CGridView and CListView

Created 10 years ago by VINAY Kr. SHARMA, updated 8 years ago by VINAY Kr. SHARMA.

CGridView and CListView are great widget to populate records and also provides features like ajax update, column sort, search, drop-down filter, ajax content load and many more...

3 0
12 followers
Viewed: 31 374 times
Version: 1.1
Category: How-tos

multiple CActiveDataProviders in one CGridView

Created 10 years ago by Kostas Apazidis (KonApaz), updated 9 years ago by Nashi.

There is a few cases that you want more of one CActiveDataProvider displayed in one CGrideView How to do that?

4 1
9 followers
Viewed: 32 491 times
Version: 1.1
Category: How-tos

Take more control of CGridview and model searching (related model or another controller)

Created 10 years ago by Kostas Apazidis (KonApaz), updated 10 years ago by CeBe.

Suppose you have an Application in Yii that manages hotels each one has many customers.

2 0
6 followers
Viewed: 41 613 times
Version: 1.1
Category: How-tos

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 666 times
Version: 1.1
Category: How-tos
Tags: CGridView

Yii CGridView add custom button

Created 10 years ago by Arockia Johnson SR, updated 10 years ago by CeBe.

Hi buddies !, This tutorial shows about how to add a custom button with your own icon for your CGridView of Yii framework

3 0
7 followers
Viewed: 49 075 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

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

CGridView. Add custom class to table rows preserving original „odd“ and „even“

Created 10 years ago by Maug Lee, updated 9 years ago by yugene.

Lets say we have such a CGridView widget showing a list of users for administrator. Users have status „active“ or „disabled“. Grid widget puts class „odd“ or „even“ to rows and we want to preserve this. So we want to add a class „disabled“ to rows with disabled users.

Implementation

<?php
$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'user-grid',
	'dat...
7 0
4 followers
Viewed: 53 891 times
Version: 1.1
Category: How-tos