views:

46

answers:

1

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.

+4  A: 
myDG.selectedIndex = 5;

Also, if the row you want selected is not currently visible (and you need to scroll down), just call scrollToIndex(5)

clownbaby
so simple...thx!
ginius