Closed kamilosinski closed 10 years ago
That's not the format that aaSorting
expects.
Example: "aaSorting": [[ 4, "desc" ]],
Yeah, I've found that in datatables docs, but I have problem with using it in $this->DataTable->render. When I use 'aaSorting' => array(4, 'desc') it results with 'TypeError: k is undefined' in FireBug console.
Regards, Kamil
What you've done is "aaSorting": [ 4, "desc" ],
with 'aaSorting' => array(4, 'desc')
. aaSorting is an array of arrays. You need to wrap array(4, 'desc')
in another array.
'aaSorting' => array(array(4, 'desc'))
It works! Thank You very much for Your help.
Regards, Kamil
Hi, I want to show Datatable with sorted data eg. 'Model.example DESC'. Should I use Cake's 'ORDER' in DataTable->settings (that doesn't work) or try 'aaSorting' from jquery Datatabels? "aaSorting":{"4":"desc"} also doesn't work.
Regards, Kamil