ColVis + Scroller width
ColVis + Scroller width
Hello!
I've been working with DataTables for a few weeks and I must say it's amazing! Looking forward for a stable 1.10 version.
I have a small problem that I couldn't find in the forums and I'm starting to think it may be intentional or unavoidable.
The thing is, I have a table with ColReorder, ColVis, TableTools and recently I added Scroller to it. Without Scroller, whenever I hid a column with ColVis the table would shrink since it had bAutoWidth disabled and widths set in aoColumns, but after adding the Scroller extra the width won't change no matter how I change the configuration.
The question is, is there any way to get the table to shrink when hiding columns while it's using Scroller? Or does Scroller need to fill 100% width for any reason? Maybe it will be fixed with version 1.10 and the newer extras? (I'm currently waiting for a stable version)
I can't link you to the page since it's an intranet project and couldn't get the DataTables live to load ColVis for some reason. I will try to add some code if needed.
The versions I'm working with are:
DataTables 1.9.4
ColVis 1.0.8
Scroller 1.1.0
Thanks in advance
I've been working with DataTables for a few weeks and I must say it's amazing! Looking forward for a stable 1.10 version.
I have a small problem that I couldn't find in the forums and I'm starting to think it may be intentional or unavoidable.
The thing is, I have a table with ColReorder, ColVis, TableTools and recently I added Scroller to it. Without Scroller, whenever I hid a column with ColVis the table would shrink since it had bAutoWidth disabled and widths set in aoColumns, but after adding the Scroller extra the width won't change no matter how I change the configuration.
The question is, is there any way to get the table to shrink when hiding columns while it's using Scroller? Or does Scroller need to fill 100% width for any reason? Maybe it will be fixed with version 1.10 and the newer extras? (I'm currently waiting for a stable version)
I can't link you to the page since it's an intranet project and couldn't get the DataTables live to load ColVis for some reason. I will try to add some code if needed.
The versions I'm working with are:
DataTables 1.9.4
ColVis 1.0.8
Scroller 1.1.0
Thanks in advance
This discussion has been closed.
Replies
Allan
http://live.datatables.net/EVIZ/1/edit
I commented out some configurations that are dependent of other code or unnecessary but you can see what I have and what don't have like this.
As you can see, the table fills 100% width even after hiding some columns and I'm trying to shrink it.
Also, it's worth noting that I'm using the versions mentioned in my previous post, but the live tool uses newer versions.
Thanks again!
You have `width="100%"` as an attribute on the table, and `width:100%` on the table in the CSS. Both of them are going to cause the table to take up 100% width.
Allan
The width in the CSS was set to auto, but I just forced it with "!important" and the table shrinks but the dataTables_scrollBody keeps filling all and the scroll bar is separated from the table. Setting ScrollBody width to auto doesn't help.
Now it shows better my problem:
http://live.datatables.net/EVIZ/4/edit
Thanks
Allan
Allan
Well, thank you for your time, work and support!