fnSetColumnVis without AJAX request

fnSetColumnVis without AJAX request

jjplawjjplaw Posts: 3Questions: 0Answers: 0
edited October 2010 in General
First of all, two thumbs up for this awesome jquery plugin.

I have server side processing enabled and the first column set to be hidden when table is first initialized.

I'm using the function fnSetColumnVis to toggle the visibility of the first column. But everytime fnSetColumnVis is being called, the table redraws and a AJAX request is being sent which is the default behavior.

Is it possible to toggle the column visibility but redraws the table without sending the AJAX request because the first column data is already loaded to the table, just that it's hidden.

Please advise.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Currently it's not possible to use fnSetColumnVis without DataTables doing a redraw (the draw is needed to re-calculate the column widths, based on the fact that one of the columns is not "missing"). Most of the other API functions which cause a draw have an option not to do the redraw - I've taken a note to add this into the next release.

    Allan
  • jjplawjjplaw Posts: 3Questions: 0Answers: 0
    sorry for the (extremely) delayed reply....

    you're awesome allan.... looking forward for the release...
    datatables... it just keeps getting better...
  • bikabika Posts: 25Questions: 0Answers: 0
    edited October 2010
    There's a workaround here for now until the next release:
    http://datatables.net/forums/comments.php?DiscussionID=2814&page=1#Comment_13359
  • jjplawjjplaw Posts: 3Questions: 0Answers: 0
    hi bika.... thanks for the workaround method...
    i'll use it until the next release is available....

    thanks again... you are also awesome my friend....
This discussion has been closed.