Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82109

Defer loading with bServerSide as 'false'.

$
0
0
So, I have a table that I wish to populate with data from an AJAX source, but wish to use client-side sorting only. However, I also wish to defer the loading until I trigger it within an event callback (When a user clicks a button.) But this doesn't seem to work.

$profilesTable.dataTable({
   sAjaxSource: Globals.base_url + '/accounts/ajax_list_profile_source',
   iDeferLoading: 0,
   bServerSide: false,
   aaSorting: [[4, 'desc']],
   fnServerParams: function(data){
       var currentAccount = $(this).data('currentAccount');
                if(currentAccount != null){
                    data.push({name: 'account_id', value: currentAccount});
                }
       }
    });


I tried turning bServerSide to 'true', which causes the XHR request to be deferred, but it is really imperative that I use client-side sorting.

How can I achieve this?

Viewing all articles
Browse latest Browse all 82109

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>