yiisoft/yii — pull request #923 by resurtm (2012-07-06 04:06:42+00:00)
Title: Fixes #803.

Testing code (works as expected now). Controller:

```php
2,'title'=>'test2'),
array('id'=>3,'title'=>'test3'),
array('id'=>4,'title'=>'test4'),
array('id'=>5,'title'=>'test5'),
array('id'=>6,'title'=>'test6'),
array('id'=>22,'title'=>'2test2'),
array('id'=>23,'title'=>'2test3'),
array('id'=>24,'title'=>'2test4'),
array('id'=>25,'title'=>'2test5'),
array('id'=>26,'title'=>'2test6'),
),array(
'sort'=>array(
'attributes'=>array(
'id'=>array(
'asc'=>'id ASC',
'desc'=>'id DESC',
),
),
),
));

$this->render('index',array(
'dataProvider'=>$dataProvider,
));
}
}
```

View:
```php

widget('zii.widgets.grid.CGridView',array(
'dataProvider'=>$dataProvider,
'columns'=>array(
array(
'name'=>'id',
),

array(
'class'=>'CDataColumn',
'header'=>CHtml::link('Yii Framework','http://yiiframework.com/'),
'name'=>'title',
),

/*
array(
'class'=>'CCheckBoxColumn',
'header'=>CHtml::link('Yii Framework','http://yiiframework.com/'),
),
*/

/*
array(
'class'=>'CLinkColumn',
'header'=>CHtml::link('Yii Framework','http://yiiframework.com/'),
),
*/

/*
array(
'class'=>'CButtonColumn',
'header'=>CHtml::link('Yii Framework','http://yiiframework.com/'),
'viewButtonUrl'=>'"#"',
'updateButtonUrl'=>'"#"',
'deleteButtonUrl'=>'"#"',
),
*/
),
)); ?>
```