Disable sScrollY
Disable sScrollY
Hi.
I need to disable sScrollY option in datatable plugin after initialising a table with this option. Regularly users do not need to disable sScrollY, but when they want to print whole table, then prior printing the table must be expanded vertically to all rows. I tried to set sScrollY to a relativelly high value, but not all rows were printed. Also I tried to set sScrollY to its default (empty), with no effect. As a workaround I use fnDestroy() function. But this disables all features like sorting and column ordering. Also in google chrome table becomes for tbody cells without border.
How can this be done with some tabledata's function or setting?
I need to disable sScrollY option in datatable plugin after initialising a table with this option. Regularly users do not need to disable sScrollY, but when they want to print whole table, then prior printing the table must be expanded vertically to all rows. I tried to set sScrollY to a relativelly high value, but not all rows were printed. Also I tried to set sScrollY to its default (empty), with no effect. As a workaround I use fnDestroy() function. But this disables all features like sorting and column ordering. Also in google chrome table becomes for tbody cells without border.
How can this be done with some tabledata's function or setting?
This discussion has been closed.
Replies
Making it dynamic would add a significant amount of code to DataTables I think.
Allan
Don't know about how much code will be altered, but simply dinamically setting sScrollY to some other value after initialisation does change vertical view area. So there can be even a bottom line under table to which can be bind an onmove event which will then change sScrollY value accordingly, thus allowing users to adjust vertical view area to theirs needs. Ofcourse after a page refresh, this height will be reset. But I don't use pagination. May be in pagination this will work but will not change the count of rows displayed per page.
I'm not pro in debugging plugins with classes so maybe there is a chance. Also will be nice to have that kind vertical expanding/compression ov view area using bottom line of the table implemented in Datatables plugin.
Allan
Allan
Just my two cents. Leave it how it is. Having the container gives a lot of control if needed. This works great in mobile apps for sure.
mimko,
I thought when using the tabletools print option it shows the whole table.
http://datatables.net/extras/tabletools
It showed the 58 records in whole. Is this not what you are wanting?
Cheers...