As far as I investigated the code and tested it myself it seems to be unpossible to make datatables load the data thru AJAX by specifying the option "sAjaxSource".
I think that should be default behavior and with the datatable (or the abstract) it should be possible to render either the table HTML and the JSON response which datatable JS library needs.
Therefore it might be nice if you could create a grid like this:
$dataTable = $this->getServiceLocator()->get('Pike\DataTables')->create('my_own_grid');
Then 'my_own_grid' should be a service, which you can customize or take the abstract service from Pike self:
'service_manager' => array(
'my_own_grid' => function($sm) {
$dataTable = new \Pike\DataTable($adapter, $dataSource, $etc);
$adapter->setTemplateFile('customer/template');
}
)
Or you create it with the abstract factory:
'service_manager' => array(
'my_own_grid' => '\Pike\DataTable\ServiceFactory',
),
'pike' => array(
'datatable' => array(
'my_own_grid' => array(
'template' => 'custom/template'
)
)
)
I am using ZfcTwig and now Pike\DataTable isn't able to work 👎
Any ideas on this @nicovogelaar?
As far as I investigated the code and tested it myself it seems to be unpossible to make datatables load the data thru AJAX by specifying the option "sAjaxSource".
I think that should be default behavior and with the datatable (or the abstract) it should be possible to render either the table HTML and the JSON response which datatable JS library needs.
Therefore it might be nice if you could create a grid like this:
Then 'my_own_grid' should be a service, which you can customize or take the abstract service from Pike self:
Or you create it with the abstract factory:
I am using ZfcTwig and now Pike\DataTable isn't able to work 👎
Any ideas on this @nicovogelaar?