DataTables logo DataTables

via Ad Packs
override processing indicator
  • Hello,
    is there a way to completely override the processing indicator? I have a general processing indicator which I use in my site, and I would like my datatables instances to call this upon ajax start/finish loading.
    Thanks in advance
  • allanallan
    Posts: 15,537
    Yes indeed there is :-). In 1.9 what you can do is listen for the "processing" event from DataTables and show / hide your own processing indicator based on that: http://datatables.net/docs/DataTables/1.9.beta.3/#processing . Then simply drop the "r" option from sDom (which means DataTables won't add the HTML needed for its processing indicator) and that's that :-)

    Allan
  • Hey thanks, that was just what I was looking for! (I also had to upgrade to 1.9, all working smooth! )
    For anyone interested here's how I implemented it:
    $('#table_id').dataTable().bind('processing', 
    function (e, oSettings, bShow) {
        if (bShow) {
            show_my_ajax_indicator();
        } else {
            hide_my_ajax_indicator();
        }
    });
    
  • allanallan
    Posts: 15,537
    Excellent - good to hear that did the job for you and thanks for sharing your solution with us :-)

    Allan
This discussion has been closed.
← All Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Support

Get useful and friendly help straight from the source.

In this Discussion