That is basically what I came up with for the solution last night. Thank
you!
dataGrid.addEventListener(KeyboardEvent.KEY_DOWN, myKeyDownHandler);
function myKeyDownHandler(event:KeyboardEvent):void {
var position:Number;
if (event.keyCode == Keyboard.RIGHT) {
position = dataGrid.horizontalScrollPosition + 1
dataGrid.horizontalScrollPosition = Math.min(position,
columns.length);
}
if (event.keyCode == Keyboard.LEFT) {
position = dataGrid.horizontalScrollPosition - 1
dataGrid.horizontalScrollPosition = Math.max(position, 0);
}
}
--- In [email protected], "valdhor" <valdhorli...@...> wrote:
>
> Try:
>
> switch(event.keyCode)
> {
> case KeyBoard.RIGHT:
> myADG.horizontalScrollPosition += 1;
> break;
> case KeyBoard.LEFT:
> myADG.horizontalScrollPosition -= 1;
> break;
> }
>
>
http://livedocs.adobe.com/flex/3/langref/mx/controls/AdvancedDataGridBas\
\
> eEx.html#horizontalScrollPosition
>
>
> --- In [email protected], "Paul" paulfischer60@ wrote:
> >
> > I am trying to make the left and right arrows on scroll the columns
on
> AdvancedDataGrids. The default keyboard navigation keys work with
> SHIFT+PAGEDOWN and SHIFT+PAGEUP. But my client would like the
functions
> to work with left and right arrows.
> >
> > I am able to create an event handler for KeyboardEvent.KeyDown and
> check for event.keyCode == KeyBoard.RIGHT and KeyBoard.LEFT. But I
can't
> figure out what code to execute from the handler to scroll the
columns.
> >
> > Does anybody know how to make this work?
> >
> > Thanks,
> > Paul
> >
>