Friday, 24 April 2015

Display only one row in CgridView in yii

Open the model from which the cgridview is generating and at the search method at the end add the bold font to the dataprovider 
i.e.,
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
// 'pagination'=>false,
'pagination'=>array(
'pageSize'=>'1',
), 
));
The above shows only one record in the  grid we can customize for more than one.
cheers!!

No comments:

Post a Comment