FixedColumns fnSetColumnVis call in _fnConstruct

FixedColumns fnSetColumnVis call in _fnConstruct

jhaitasjhaitas Posts: 32Questions: 0Answers: 0
edited June 2012 in Plug-ins
For performance reasons I added a 3rd parameter to the fnSetColumnVis() calls in _fnConstruct of FixedColumns. By setting the 3rd parameter to 'false' it stops the table from redrawing - improving performance at load time. I am not sure if there is a reason why we would want that to be 'true' - perhaps for a case that I do not see in my usage of DataTables.

This is how my code looks - just adding the third parameter to fnSetColumnVis() ...

[code]
/* Use the DataTables API method fnSetColumnVis to hide the columns we are going to fix */
for ( i=0 ; i

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    You might want to have a look at the very latest FixedColumns code in Github - https://github.com/DataTables/FixedColumns . I've actually removed the use of hidden columns in FixedColumns altogether now :-).

    The reasoning behind this is to allow the scrollbar that we see in FixedColumns to be shown along the whole length of the table, rather than just the non-fixed area, which I think is a better interaction for the end user.

    If you clone the repo the examples should show the behaviour that I've implemented. Note that there are a few little issues still to be worked out before releasing it though!

    Allan
  • jhaitasjhaitas Posts: 32Questions: 0Answers: 0
    edited June 2012
    I just realized right before you sent that message.

    Seems the 2.0.5 may make some of my patches irrelevant - which is a good thing :)

    I am happy to help with this

    Do you think that patch to get Scroller and FixedColumns to work together can go into this release?
This discussion has been closed.