Reputation: 488
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.
Upvotes: 0
Views: 2487
Reputation: 10190
myDG.selectedIndex = 5;
Also, if the row you want selected is not currently visible (and you need to scroll down), just call scrollToIndex(5)
Upvotes: 4