:: Forum >>

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;
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?

Friday, April 5, 2019
wrong OP
Thierry Nivelet (FoxInCloud)
Friday, April 5, 2019
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)
Sunday, April 14, 2019
OK, thanks Alex, will look for some instruction of that kind
Thierry Nivelet (FoxInCloud)
Tuesday, April 16, 2019
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:


How can we inhibit this behavior?
Thierry Nivelet (FoxInCloud)
Tuesday, April 16, 2019
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)
Friday, May 10, 2019

Post a reply:


Back to support forum

Forum search