3.0 beta 2

[no subject]

I need to let left and right arrows scroll the grid to enhance the app for 'accessibility'. (Customer is a governemental entity).

I'm capturing left and right keys since the grid doesn't. I want to know how to tell a grid to scroll left and right. I've tried obj.setColumnProperty( "index", iCurrentCol ); where obj is the Active.Controls.Grid object but id doesn't take any action.

setSelectionIndex() in the grid takes a row index but ignores the column index. It affects scrollTop (probably for the scrollbar element as near as I can tell) but very little affects scrollLeft.

What am I missing here? Do I need to clone the code from setSelectionIndex() somehow and do it in my code?

No rush, go live is Tuesday. (But I have a retrieve as this only affects one screen out of dozens). Any help is appreciated.
Bill Honaker
June 9,
To scroll right:
grid.setScrollLeft(grid.getScrollLeft()+10);
DT
June 9,
The grid (version 1.0) updates scroll offsets when the index of the current row changes. All this happens in setSelectionIndex() method - you should make similar code for left-right scroll in response to keyboard events.
Alex (ActiveWidgets)
June 12,
grid.getScrollLeft() causes error;
Object doesn't support this property or method.

Note: This is version 1. In the grid.js file I have there is no getScrollLeft (even when searching with 'ignore case' set).
Bill Honaker
June 12,
Version 1 did not have scroll model - getScrollLeft() method only exists in version 2.
Alex (ActiveWidgets)
June 12,
I made it work by:
Using onkeydown event in body
Searching for the DIV element with class 'active-scroll-bars '
(after the grid is populated)
Reading and updating the scrollLeft property of that div by 100
when right and left arrows are clicked.

Finished at noon today as the USA was being whacked in WC...

I sort of guessed this morning that it might have been added only to the new version, so I did it the hard, non-portable way. If I needed it in more than two places I probably would have encapsulated the functionality...

Thanks for the answers, and the widgets, Alex!
Bill Honaker
June 12,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.