Open Anu13sree opened 8 years ago
@meetselva Can you please let me know is there any way to achieve the same?
@Anu13sree Apologies, I was out for sometime and did not had time to check my messages.
Rebuilding isn't currently available in the plugin, but we should be able to strip off all changes and call the plugin again.
Let me check..
I wrote a simple revert code that would revert most changes and allows you to call the plugin again to rebuild the table.
$fixedTable = <your fixed table selector> $fixedTable.closest('.ft_scroller').unbind('scroll'); $fixedTable.closest('.ft_rel_container').find('.ft_rc, .ft_cwrapper, .ft_rwrapper').remove(); $fixedTable.unwrap().unwrap().unwrap().removeClass('ui-widget-header').find('.ui-widget-content').removeClass('.ui-widget-content');
**Feel free to adjust the above code, it is just a rough code to remove all elements that plugin included to create a fixed row/column.
A working example: http://codepen.io/meetselva/pen/qNJNYQ - Try the 'Apply Plugin' button and the 'Destroy' button to see how the plugin code is reverted.
Note: Destroy does not fully revert all the changes. Changes such as width/align set to each TD/Table are not reverted. However, when the plugin is called again after changes, it will rebuild/adjust the width.
Also Do not forget to adjust the colModal
after removing a column.
Thanks @meetselva for the quick response and the solution :+1: But can you let me know how we can add dynamic width to the colspan parameter.
Fixed column is causing issue in case if I dynamically hide the columns. The cloned column width is not getting updated. I would need to know how can we destroy the table and create the same again.
Thanks in advance.![capture](https://cloud.githubusercontent.com/assets/15359779/17330973/a4b93ec8-58e6-11e6-9199-bec50b922e8a.PNG)