Scroller: issues with column width and row height
Scroller: issues with column width and row height
1. column width
if [code]"bAutoWidth": true[/code] then column width change while scrolling even though sScrollX and sWidth for each column is set. This looks a bit weird and can be annoying if a user focuses on a certain column.
If [code]"bAutoWidth": false[/code] sScrollX and sWidth seem to be ignored completely. The width of the table is much to small (much smaller than sScrollX and hence most columns are a lot to small too.
(Note: This works fine when scrolling without Scroller but performance is unusable in IE)
Personally I would like a setting that just disables any calculations and sets the columns to the width set in sWdith.
If the column is too small for content, increase row height but the columns should always have the specified width.
In this case sScrollX should automatically be set to Sum of all column width + width of vertical scrollbar.
Probably I'm naive as I'm not seeing the reason for all these calculations if I explicitly supply the information. Just apply it and if it is bad, then it's my fault.
2.
[code]
"oScroller": {
"rowHeight": "90px"
}
[/code]
rowHeight settings is ignored. It is completely irrelevant to what i set here.
Scroller.js contains on line 372:
[code]
if ( this.s.rowHeight != 'auto' )
{
this.s.rowHeight = false;
}
[/code]
However commenting this also has no effect because of:
[code]
if ( this.s.autoHeight )
{
this._fnCalcRowHeight();
}
[/code]
autoHeight is set to true and setting it to false breaks datatables completely.
Only thing that does help is to edit _fnCalcRowHeight on line 600. Replace
[code]
this.s.rowHeight = $(nTr).height();
[/code]
with
[code]
this.s.rowHeight = 90;
[/code]
and it works and the information (eg showing rows x to y) is correct.
So this is obviously a Bug. Also if this woudl be called after fnCellCreated, then the css applied in that function defining row height could be used and hence the correct row height could be determined if it is set through css.
if [code]"bAutoWidth": true[/code] then column width change while scrolling even though sScrollX and sWidth for each column is set. This looks a bit weird and can be annoying if a user focuses on a certain column.
If [code]"bAutoWidth": false[/code] sScrollX and sWidth seem to be ignored completely. The width of the table is much to small (much smaller than sScrollX and hence most columns are a lot to small too.
(Note: This works fine when scrolling without Scroller but performance is unusable in IE)
Personally I would like a setting that just disables any calculations and sets the columns to the width set in sWdith.
If the column is too small for content, increase row height but the columns should always have the specified width.
In this case sScrollX should automatically be set to Sum of all column width + width of vertical scrollbar.
Probably I'm naive as I'm not seeing the reason for all these calculations if I explicitly supply the information. Just apply it and if it is bad, then it's my fault.
2.
[code]
"oScroller": {
"rowHeight": "90px"
}
[/code]
rowHeight settings is ignored. It is completely irrelevant to what i set here.
Scroller.js contains on line 372:
[code]
if ( this.s.rowHeight != 'auto' )
{
this.s.rowHeight = false;
}
[/code]
However commenting this also has no effect because of:
[code]
if ( this.s.autoHeight )
{
this._fnCalcRowHeight();
}
[/code]
autoHeight is set to true and setting it to false breaks datatables completely.
Only thing that does help is to edit _fnCalcRowHeight on line 600. Replace
[code]
this.s.rowHeight = $(nTr).height();
[/code]
with
[code]
this.s.rowHeight = 90;
[/code]
and it works and the information (eg showing rows x to y) is correct.
So this is obviously a Bug. Also if this woudl be called after fnCellCreated, then the css applied in that function defining row height could be used and hence the correct row height could be determined if it is set through css.
This discussion has been closed.