Column mis-alignment with auto table layout and horizontal scrollbar
Column mis-alignment with auto table layout and horizontal scrollbar
tjain1981
Posts: 4Questions: 0Answers: 0
I was trying to use datatable in my application and run into this issue. My table has around 25 columns and has automatic layout (not fixed).
Problem is when sort any column, table get re-align. Same can be seen on following url - http://jsfiddle.net/tjain/2myVm/embedded/result/
Problem is there when i am using horizontal scrollbar.
Problem is when sort any column, table get re-align. Same can be seen on following url - http://jsfiddle.net/tjain/2myVm/embedded/result/
Problem is there when i am using horizontal scrollbar.
This discussion has been closed.
Replies
It seems like in automatic layout table is not giving importance to width style. So even when width style is applied on table, column resize itself to minimum content widget of the column which breaks sub-subsequent code computations.
This could be fixed if we add following line
nSizer.style.width = _fnStringToCss( aApplied.shift() );
after -
nSizer.style.minWidth =nSizer.style.width;
both for headers and footers
Whenever I try using horizontal and vertical scrollbars(both) with a large dataset, I get misalignment problems
I would try your fix out and see if it works.