Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed column is causing issue in case if I dynamically hide the columns #34

Open
Anu13sree opened this issue Aug 2, 2016 · 4 comments
Assignees

Comments

@Anu13sree
Copy link

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

@Anu13sree
Copy link
Author

@meetselva Can you please let me know is there any way to achieve the same?

@meetselva
Copy link
Owner

@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..

@meetselva
Copy link
Owner

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.

@Anu13sree
Copy link
Author

Anu13sree commented Aug 9, 2016

Thanks @meetselva for the quick response and the solution 👍 But can you let me know how we can add dynamic width to the colspan parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants