3.0 beta 2

grid.setScrollBars('none') ignored

Hi Alex,

In http://foxincloud.com/tutotest/bs/report.tuto,

- the left grid (id="report_scx-grdcustomer") has no scroll bar setting
- the right grid (id="report_scx-grdorders") has
grid.setScrollBars('none');
as can be seen in its JavaScript (http://foxincloud.com/tutotest/bs/report_scx.js, line 197)

When setting a break point after the HTML of both grids is built (on line 548 of http://foxincloud.com/tutotest/bs/report_scx.js), you can see:
- left grid has both scroll bars
- right grid has no scroll bar

At this point the scroll bar settings are respected.

However, if you resume execution, after the grids are filled with data, the right grid gets 'automatic' scroll bars (depending on content width and height).

I have tried to restore the scrollBars in the AJAX response callback without success:
oTable = new AW.XML.Table;
oGrid.setCellModel(oTable);
oGrid.setVirtualMode(false);
oTable.setURL("../Temp/report_scx-grdorders.xml");
oTable.setAsync(true);
oTable.response = new Function('xml', "this.setXML(xml);var grid = this.$owner;if (grid) {var rowHeight = grid.getRowHeight();var scrollBars = grid.getScrollBars();grid.clearScrollModel();grid.clearSelectedModel();grid.clearSortModel();grid.clearRowModel();grid.setRowHeight(rowHeight);grid.setRowCount(this.getCount());grid.refresh();grid.setScrollBars(scrollBars);}")
oTable.request();


what else can we do?

thanks
ve
April 5,
wrong OP
Thierry Nivelet (FoxInCloud)
April 5,
The value of the 'scrollbars' property of the right grid is 'horizontal'. If you open browser console and run the following statements -

var obj = AW.object('aw37'); // look for grid id in web inspector
obj.getScrollBars(); // returns 'horizontal'


Also

obj.setScrollBars('none'); // hides scrollbars
obj.getScrollBars(); // returns 'none'


So I would say most likely there is some code somewhere which sets scrollbars to 'horizontal' in this case.
Alex (ActiveWidgets)
April 14,
OK, thanks Alex, will look for some instruction of that kind
Thierry Nivelet (FoxInCloud)
April 16,
Hi Alex,

Using Chrome, I've set a breakpoint on attribute change of
<span id="aw37-scroll" class="aw-scroll-bars  aw-scrollbars-...">
and saw that
obj._endUpdate()
seems to recalculate the scroll bars based on content's size as these 2 screenshots illustrate:

http://foxincloud.com/images/aw.setScrollBars-1.png
http://foxincloud.com/images/aw.setScrollBars-2.png

How can we inhibit this behavior?
Thierry Nivelet (FoxInCloud)
April 16,

Post a reply:

Text:
Name:

Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.