Order with other table
<?php $dataProvider=new CActiveDataProvider('WatchList', array( 'criteria'=>array( 'condition'=>'t.watch_by=:id', 'params'=>array(':id'=>$model->id), 'order'=>'us.name ASC', 'join' => 'LEFT JOIN user us on us.id = t.watch_to', ), 'pagination'=>array( 'pageSize'=>50, ), )); $this->renderPartial('WatchList', array('dataProvider'=>$dataProvider)); ?> WatchList.php page
<?php
$this->widget('zii.widgets.grid.CGridView', array( 'id'=>'watch-list-grid', 'dataProvider'=>$dataProvider,
'columns'=>array( array( 'name' => 'WatchTo.name', // WatchTo relation name 'value' => 'CHtml::link($data->WatchTo->name,Yii::app()->createUrl("site/taskview",array("id"=>$data->watch_to)))', 'type' => 'raw', ),
array( 'class'=>'CButtonColumn', 'template'=>'{delete}', ), ), )); ?>