Default Sort for grouped table

Default Sort for grouped table

EkabodEkabod Posts: 1Questions: 1Answers: 0
edited January 2015 in Free community support

I have a datatable that was created by a different developer. The table is using rowGrouping. It loads correctly, and after loading, can be resorted by the alphanumeric value in column 4, but I can't seem to find a way to get the default sorting for that column to be ascending. The default is however the table is built. I was hoping to alter the datatable default sort, rather than trying to change the way the table is built.

Here is how it is currently being created:

$('#people_block_holder table').dataTable({
            'bJQueryUI': true,
            'iDisplayLength': 50,
            'sPaginationType': 'full_numbers',
            'aoColumns': [
                {},
                {},
                {},
                {'sType': 'alphanumeric' },
                { 'sType': 'currency' },
                {}
            ]
        }).rowGrouping(); 
        $('select#actions').not('.dataTables_length select').not('.no-selectmenu').selectmenu();

I have tried adding 'order':[[4, 'asc']] and aaSorting, but nothing seems to change the default sort order.

Answers

  • allanallan Posts: 61,892Questions: 1Answers: 10,144 Site admin

    rowGrouping is not a plug-in that is part of the DataTables project - it is third party software. If you are having problems with it, you might be best to ask on their issues list.

    Might also be worth checking that it is rowGrouping which is causing the issue by disabling it. If it is not rowGrouping causing the problem, a link tot he page so I can debug it would be great.

    Allan

This discussion has been closed.