Well, unlike CActiveDataProvider
, CSqlDataProvider
doesn't have all the needed information to support default CButtonColumn
buttons.
CActiveDataProvider
will provide object, but CSqlDataProvider
will provide array, and CButtonColumn
works with objects, that's why you get "Trying to get property of non-object" error message...
You should define buttons url, e.g. :
array(
'class'=>'zii.widgets.grid.CButtonColumn',
'viewButtonUrl'=>'Yii::app()->createUrl("/mycontroller/view", array("id"=>$data["idCall"]))',
'updateButtonUrl'=>'Yii::app()->createUrl("/mycontroller/update", array("id"=>$data["idCall"]))',
'deleteButtonUrl'=>'Yii::app()->createUrl("/mycontroller/delete", array("id"=>$data["idCall"]))',
),