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

Want to hide the rows by click the row title #44

Open
mag2000 opened this issue Mar 18, 2017 · 3 comments
Open

Want to hide the rows by click the row title #44

mag2000 opened this issue Mar 18, 2017 · 3 comments

Comments

@mag2000
Copy link

mag2000 commented Mar 18, 2017

I have the table and, want to hide the any particular row by first column click. This column is fixed column in table. I used the following command for testing. I give the table id is example.

I entered $('#example tr:first').hide();. it will hide the row but also hide the scroll bar and also disturbed the table.

Above testing I am doing for add the group of rows. When your click the icon in row it will show further rows, and when user click again hide the rows. This will become the table with group option.

For your review. I am attached the snap of the problem. if you have any solution please let me know.
snap of the problem

Waiting for your reply
Thanks & Best Regards

@meetselva
Copy link
Owner

Apologies, I couldn't get to spend time on the issues lately. As you may have noticed, the plugin build additional tables to make it look like fixed row/columns and controls the scroll. All that is setup perfectly on load time. The problem is, When the content is disturbed (width, height, value), the plugin does not detect the change and update the changes..

For now, the only quick work around I can suggest is to reinitialize the plugin again after the change.

To initialize, please try the below code and let me know if it worked for you.

$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 if you are changing/removing the column.

@mag2000
Copy link
Author

mag2000 commented Mar 20, 2017

Thanks for your prompt reply

As it will effect the entire screen, even user just hide only one row. This will have very unpleasant experience for users.

Please if you have any other solution share with me. I will try this as well for the time being.
Thanks for help
Best Regards

@mag2000
Copy link
Author

mag2000 commented Mar 20, 2017

Sorry, did not mentioned before, that I am not removing column. When your click on the row, the some row hide or un-hide. Column will be the remain same.

Regards

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

No branches or pull requests

2 participants