Showing 1-20 of 29 items.

Insert a multirow header in CGridView

Created 13 years ago by Peppe Peppe, updated 11 years ago by Peppe Peppe. 2 comments

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
Viewed: 31 139 times
Version: 1.1
Category: How-tos

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

Created 13 years ago by Maug Lee Maug Lee, updated 12 years ago by yugene yugene. 2 comments

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
Viewed: 59 211 times
Version: 1.1
Category: How-tos