Flexible width datatables
Flexible width datatables
Hey guys, thanks for the library.
I'm trying to create a flexible width table that resizes with the browser, and when the table gets too small to resize, allows for overflow scroll.
Now I currently have that implemented without DataTables, but doing it with datatables is proving to be quite difficult. I don't have enough say in the layout of the structure that's generated in the dom to fully control it: I actually find myself overriding styles set inline by your library with jQuery, immediately after it's instantiated.
So I guess what would help me is 2 things: can I gain a finer control over how everything is structured, and if not, is there anything I can set what would achieve desired functionality? Thanks.
Edit: ideally I could get this to work with a theme roller theme (even if I have to mod it heavily (which I already have for the current version))
I'm trying to create a flexible width table that resizes with the browser, and when the table gets too small to resize, allows for overflow scroll.
Now I currently have that implemented without DataTables, but doing it with datatables is proving to be quite difficult. I don't have enough say in the layout of the structure that's generated in the dom to fully control it: I actually find myself overriding styles set inline by your library with jQuery, immediately after it's instantiated.
So I guess what would help me is 2 things: can I gain a finer control over how everything is structured, and if not, is there anything I can set what would achieve desired functionality? Thanks.
Edit: ideally I could get this to work with a theme roller theme (even if I have to mod it heavily (which I already have for the current version))
This discussion has been closed.
Replies
What version are you using of DataTables? It should be fairly easy to get this to work with the 1.7 betas, which have scrolling support built in. What you need to do is enable the x-scrolling and have the container around it (around the table you had in the DOM) as a flexible width one. If you use the sScrollXInner option, then it needs to be set to an absolute value rather than a relative one. I've just experimented with this a little and it seems to work well.
Allan