fheider / cakephp-datatables

CakePHP3 Plugin for DataTables plug-in for jQuery
MIT License
14 stars 40 forks source link

Use callback functions on DataTables->init #3

Closed gildonei closed 8 years ago

gildonei commented 9 years ago

how could I use callback function like "rowCallback" - https://datatables.net/examples/server_side/select_rows.html - on $this->DataTables->init([...

ypnos-web commented 9 years ago

DataTablesHelper uses json to communicate options with datatables so it is not possible to pass javascript functions through init().

My pull request #13 is very related to this. If you apply #13, you can write your custom js function somewhere else and let it be called after initialization. In your js you can add the callback. I haven't tried that yet though.

ypnos-web commented 8 years ago

Have a look at #14

gildonei commented 8 years ago

Thanks!