I have a datagrid. How can I put the focus on a particular row (ie row #5) of a datagrid via actionscript?
I'm partially there, but not quite:
stage.focus = myDG;
this obviously just sets the focus to the datagrid and not the row.
I have a datagrid. How can I put the focus on a particular row (ie row #5) of a datagrid via actionscript?
I'm partially there, but not quite:
stage.focus = myDG;
this obviously just sets the focus to the datagrid and not the row.
myDG.selectedIndex = 5;
Also, if the row you want selected is not currently visible (and you need to scroll down), just call scrollToIndex(5)