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
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;
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);}")

what else can we do?

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'


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
seems to recalculate the scroll bars based on content's size as these 2 screenshots illustrate:


How can we inhibit this behavior?
Thierry Nivelet (FoxInCloud)
April 16,
Sorry, I was not correct regarding how setScrollBars() method is called - it is indeed done internally by the `overflow` controller.

It is possible to block any property change with onPropertyChanging event -

    obj.onScrollBarsChanging = function(e){
        return true;

This should 'lock' scrollBars property in 'none' state.
Alex (ActiveWidgets)
May 10,
Thanks Alex,

Implemented successfully:

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

The right grid (`orders`) has vertical scrollbars only, and keeps this setting regardless of the amount of data it contains.

here is our code:
onScrollBarsChanging = function(e){return false};
onScrollBarsChanging = function(e){return true};
Thierry Nivelet (FoxInCloud)
May 22,

Post a reply:


Back to support forum


Version 2

Looking for AW 2.6 ?
The old site is here.