Questions on functionality for realtime data tables.

Questions on functionality for realtime data tables.

TJ14TJ14 Posts: 10Questions: 4Answers: 0

I have set up a simple datatable that takes in an ajax source and calls the fnAjaxReload incrementally. However every time the table reloads a processing message flashes across the screen. Is there a built in way to remove this processing message for every reload? It doesn't make since to use datatable for a realtime function if every second the processing banner is flashing across the table.

This question has accepted answers - jump to:

Answers

  • ignignoktignignokt Posts: 146Questions: 4Answers: 39
    Answer ✓

    Set processing to false like so:

    var table = $('#example').DataTable({
        processing: false
    
  • TJ14TJ14 Posts: 10Questions: 4Answers: 0

    Thanks for the quick response, but the problem persists. Here is my code, if you can see anything else wrong.



    $(document).ready(function () { var table = $('#myDataTable').DataTable({ autoWidth: false, bProcessing: true, sAjaxSource: '@Url.Action("GetDropData", "Drops")', processing: false, "columns": [ { "width": "10%" }, { "width": "50%" }, { "width": "40%" } ] }); setInterval(function () { table.ajax.reload(null, false); // user paging is not reset on reload }, 3000); });
  • TJ14TJ14 Posts: 10Questions: 4Answers: 0

    I just realized I had the bProcessing set to true. Thanks for the tip ignignokt.

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Answer ✓

    bProcessing and processing are basically the same thing with a (slightly) different name. processing is the preferred method, but the legacy bProcessing option will override it if specified.

    Allan

This discussion has been closed.