meetselva / fixed-table-rows-cols

Fixed Table Header and Columns
http://meetselva.github.com/fixed-table-rows-cols/
Other
77 stars 42 forks source link

Dynamically change fixedCols #19

Closed er40 closed 8 years ago

er40 commented 9 years ago

I have a table with a lot of data (using Angular to data-bind) and the table shows and hides some columns based on a toggle. I want to be able to change the number of fixedCols when this toggle is clicked. What would be the best way of doing this using your framework? Specifically, I want the table to have 0 fixedCols, and when the toggle is activated, the number increases to 3.

Thanks!

meetselva commented 9 years ago

Thanks for trying out my plugin. I am trying to resolve issue 4 and 18.

As for the above request, the plugin doesn't support hiding/displaying specific columns, however you can hide/show specific columns without affecting the plugin.

The fixed column is nothing but a sub-table of the original table that is displayed above the original table.. so that it stays in view when scrolled horizontally. So in your case, you can simply hide the fixed column sub-table from view when toggle is activated.

The div wrapping the fixed column table is ft_cwrapper, you can simply hide that div when the toggle is activated.

Post a demo somewhere like http://jsfiddle.net if you are facing any issues.