Is there any possibility to redraw a table without triggering the AJAX request in server mode?

Is there any possibility to redraw a table without triggering the AJAX request in server mode?

claudixclaudix Posts: 2Questions: 1Answers: 0

Hi!
I have a tabs widget (jquery-ui tabs) with a table in each corresponding panel, and I load them on page load. The table in the first tab panel is displayed OK. However, when I switch to other tabs, columns are not displayed properly. If I issue a draw() then columns are shown OK but I notice that an AJAX request is sent. I tried passing different options to draw() without success.

Thank you!

This question has an accepted answers - jump to answer

Answers

  • rduncecbrduncecb Posts: 125Questions: 2Answers: 28
    edited February 2018 Answer ✓

    If you're calling .draw() just to make the headers line up then there's an alternative, call table.columns.adjust() instead, it's job is to recalculate the column header widths, which I believe does not call draw(). Server side mode will always cause an ajax call in serverside mode when draw() is called.

  • claudixclaudix Posts: 2Questions: 1Answers: 0

    It worked like a charm. Thank you very much!

This discussion has been closed.