⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Datatables sorting/ordering



gralosky
  • profile picture
  • Member

Posted 01 August 2012 - 12:32 PM

Hi

This is my simple code:
[php] $crud = new grocery_CRUD();
$crud->set_theme('datatables');
$crud->set_table('resolutions');
$crud->columns('id', 'title', 'date', 'symbol');
$crud->set_subject('Resolutions');
$crud->order_by('symbol','desc');
$output = $crud->render();
[/php]
I have set order_by descend by title column and my output is ordered ascend by id column (first column), but when i change theme to flexigrid ordering is ok.
I supposed the problem is in the datatables because cookie SpryMedia_DataTables_groceryCrudTable_lista has always "aaSorting":[ [0,"asc"]].

Please help me to solve this problem.

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 01 August 2012 - 15:35 PM

Hello [member='gralosky'] and welcome to the forum. I can confirm that this is a bug so I tracked it for the next version ( https://github.com/s...-crud/issues/80 ). For now I cannot give you a quick work-around for this without changing the Core functionality of grocery CRUD.

Thanks to mention it

Kindest Regards
John Skoumbourdis

casachit
  • profile picture
  • Member

Posted 07 August 2012 - 05:31 AM

[quote name='web-johnny' timestamp='1343835340' post='2920']
Hello [member='gralosky'] and welcome to the forum. I can confirm that this is a bug so I tracked it for the next version ( https://github.com/s...-crud/issues/80 ). For now I cannot give you a quick work-around for this without changing the Core functionality of grocery CRUD.

Thanks to mention it

Kindest Regards
John Skoumbourdis
[/quote]

can you provide some solution to this.??? even if its changing the core functionality..