1

I used EdataTable extension in my yii Project. I have customized the yii datatable emptyText value in EDataTable.php file. I used dynamic error message when data empty. but this message not reflected in ajax requests. I initialized Yii datatable widget in my file.

myfile.php:

 $widget=$this->createWidget('ext.EDataTables.EDataTables', array(
  'id' => 'placement',
  'dataProvider' => $arrayDataProvider,
  'TotalRowCount' => $TotalRowCount,
  'emptyMessage' => $errorMessage,
  'ajaxUrl' => Yii::app()->getBaseUrl(),
  'exportable' => TRUE,
  'columns' => $columns,
  'bootstrap' => TRUE,
));

In EDataTable.php:

"sEmptyTable" => $this->emptyMessage

this emptyMessage value not worked on ajax requests like data table sorting, searching etc. New error Message not bind to edatatable.

But it works fine when first time pages loads.

In Yii How to change the emptyText value for ajax calls?

Mj.
  • 321
  • 1
  • 6
  • 13

0 Answers0