Horizontal Scrolling and Column Filtering

Horizontal Scrolling and Column Filtering

calebercaleber Posts: 7Questions: 0Answers: 0
edited September 2011 in General
I'm working on an application that does a lot of column filtering. On some tables with certain filters enabled, the number of visible columns could drop by about 40. Obviously, I'd rather not have the table redrawn after each column is hidden, so I'm using fnSetColumnVis with the final optional argument set to false (fnSetColumnVis(i, false, false)), then calling fnDraw(true) myself after I've done all the filtering.

I see a large increase in performance (yay!), but have run into another problem. It appears that doing it this way causes the horizontal scroll to not be resized on the table redraw. Basically, if I filter from 50 columns down to 10, the horizontal scroll size is not changed and the remaining 10 columns are stretched out to cover the same size horizontal scroll that was previously covered by 50 columns.

However, I've noticed that if I omit the final parameter (fnSetColumnVis(i, false)), the horizontal scroll resizes correctly and the columns are not stretched out, though I take a large performance hit.

Has anyone else run into this? Unfortunately I can't post a demo, but I can share screenshots if that would help.
This discussion has been closed.