helloo all
I got an error i got parse error in e-datatable but can’t solve it if any one has any idea about pls tell me
For more i idea i have below code:
public function actionDatatable()
{
$criteria = new CDbCriteria;
if (isset($_REQUEST['sSearch']) && isset($_REQUEST['sSearch']{0})) {
$criteria->addSearchCondition('textColumn', $_REQUEST['sSearch'], true, 'AND', 'LIKE');
}
$sort = new EDTSort('User', array('user_name','address'));
$pagination = new EDTPagination();
$dataProvider = new CActiveDataProvider('User', array(
'criteria' => $criteria,
'pagination' => $pagination,
'sort' => $sort,
));
$widget=$this->createWidget('ext.EDataTables.EDataTables', array(
'id' => 'user',
'dataProvider' => $dataProvider,
'ajaxUrl' => Yii::app()->request->getBaseUrl().'/user/datatable',
'columns' => array('user_name','address'),
));
if (!Yii::app()->getRequest()->getIsAjaxRequest()) {
$this->render('datatable', array('widget' => $widget));
return;
} else {
json_encode($widget->getFormattedData(intval($_REQUEST['sEcho'])));
Yii::app()->end();
}
}