column sizing and resizing
column sizing and resizing
jeremyh
Posts: 6Questions: 0Answers: 0
I have a fixed-width DataTable. I want to give the user the ability to switch this layout from "fixed" to "fit" layout. Is there a way to have datatable re-layout the columns without clearing and reinitializing the table.
See the fiddle: http://jsfiddle.net/sEXbs/1/
(The fiddle shows a static version - in production, I will be using an ajax datasource and allow for column selection.)
Also, I noticed that that DataTables seems to pick different values for the widths. In the fiddle above, the first few values are 27, while the last few are 28. (In some cases, I've seen 4 different numbers, gradually changing for each group of columns.)
See the fiddle: http://jsfiddle.net/sEXbs/1/
(The fiddle shows a static version - in production, I will be using an ajax datasource and allow for column selection.)
Also, I noticed that that DataTables seems to pick different values for the widths. In the fiddle above, the first few values are 27, while the last few are 28. (In some cases, I've seen 4 different numbers, gradually changing for each group of columns.)
This discussion has been closed.