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

Showing 1-20 of 29 items.

Clear CGridView Filters, Sort & Pager

Created 4 years ago by le_top, updated 4 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: 13 141 times
Version: 1.1
Category: How-tos

How to keep filters simple in CGridView

Created 4 years ago by Peppe, updated 4 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: 9 158 times
Version: 1.1
Category: How-tos

Update specific cgridview html row after AJAX request

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 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
3 followers
Viewed: 17 784 times
Version: 1.1
Category: How-tos

Insert a model record using CGridview

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

CGridview displays existent rows of the table (using DataProvider)

2 0
1 follower
Viewed: 13 105 times
Version: 1.1
Category: How-tos

Update CGridview row separately using ajax request

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

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

5 0
8 followers
Viewed: 19 821 times
Version: 1.1
Category: How-tos

Advanced CGridview issues - custom button using php and html

Created 5 years ago by Kostas Apazidis (KonApaz), updated 5 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: 9 903 times
Version: 1.1
Category: How-tos

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

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

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

2 0
6 followers
Viewed: 35 354 times
Version: 1.1
Category: How-tos

Yii CGridView add custom button

Created 5 years ago by Arockia Johnson SR, updated 5 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: 40 149 times
Version: 1.1
Category: How-tos

two or more different collected data in one CGridView

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

Assume that you have teachers and students model.

2 1
6 followers
Viewed: 13 627 times
Version: 1.1
Category: How-tos

CGridView Date Range Without Cookies or Session (External Filtering)

Created 5 years ago by ezekielnoob, updated 4 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: 17 496 times
Version: 1.1
Category: How-tos

Insert a multirow header in CGridView

Created 5 years ago by Peppe, updated 4 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: 21 456 times
Version: 1.1
Category: How-tos

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

Created 5 years ago by VINAY Kr. SHARMA, updated 3 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: 28 030 times
Version: 1.1
Category: How-tos

multiple CActiveDataProviders in one CGridView

Created 5 years ago by Kostas Apazidis (KonApaz), updated 4 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: 26 710 times
Version: 1.1
Category: How-tos

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

Created 5 years ago by Maug Lee, updated 4 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: 45 638 times
Version: 1.1
Category: How-tos

Limit a CGridView field to some preset length.

Created 6 years ago by le_top, updated 6 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
10 followers
Viewed: 16 125 times
Version: 1.1
Category: How-tos

Create custom button button with AJAX function in CGridView

Created 6 years ago by nkd, updated 6 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: 60 548 times
Version: 1.1
Category: How-tos

Displaying image in a CGridView column.

Created 7 years ago by sirin k, updated a year 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: 68 184 times
Version: 1.1
Category: How-tos

Searching and Sorting by Count of Related Items in CGridView

Created 7 years ago by softark, updated 4 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
41 followers
Viewed: 50 921 times
Version: 1.1
Category: How-tos

Using CJuiDatePicker for CGridView filter

Created 7 years ago by softark, updated 5 years ago by Kostas Apazidis (KonApaz).

We can use a CJuiDatePicker for a CGridView inline filter.

19 0
31 followers
Viewed: 56 686 times
Version: 1.1
Category: How-tos

CGridView keep focus on the control after filtering

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

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

5 0
10 followers
Viewed: 13 594 times
Version: 1.1
Category: How-tos