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

Showing 1-20 of 29 items.

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

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 828 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 383 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 516 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 071 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 546 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 605 times
Version: 1.1
Category: How-tos

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 067 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 350 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 145 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 256 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 488 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 888 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 223 times
Version: 1.1
Category: How-tos

Create custom button button with AJAX function in CGridView

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

This will call the controller function using AJAX instead of redirecting the user to the url using GET parameters.

5 0
15 followers
Viewed: 67 411 times
Version: 1.1
Category: How-tos

Displaying image in a CGridView column.

Created 11 years ago by sirin k, updated 6 years ago by Maurizio Domba Cerin.

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.

9 1
14 followers
Viewed: 74 637 times
Version: 1.1
Category: How-tos

Searching and Sorting by Count of Related Items in CGridView

Created 12 years ago by softark, updated 9 years ago by softark.

class Post extends CActiveRecord {

...

} ` When you list Authors in grid you would like to print the count of posts in column, allow sorting on this column and probably filtering by the count.

21 0
40 followers
Viewed: 58 410 times
Version: 1.1
Category: How-tos

Using CJuiDatePicker for CGridView filter

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

We can use a CJuiDatePicker for a CGridView inline filter.

19 0
31 followers
Viewed: 63 639 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 006 times
Version: 1.1
Category: How-tos