You can select an item in the FlexDataGrid control using the following procedures.
If you know the index value of the FlexDataGrid item, use the SelectIndex method.
For example, type FlexDataGrid.SelectIndex(1)
The syntax is: FlexDataGrid.Select(“*Item1* | Item2 | Item3”)
The following example selects an item using the Select method (randomly).
[ ] LIST OF LIST OF STRING allVisibleItems [ ] window dataGrid = AdobeFlashPlayer9.FlexApplication0.Index0.Index1.SwfLoader.ControlsSimpleDataGridSwf.DataGridControlExample.Dg [ ] [ ] // lets get all currently visible items [ ] allVisibleItems = dataGrid.GetValues(dataGrid.firstVisibleRow, dataGrid.lastVisibleRow) [ ] [ ] // pick a random element that we want to select [ ] integer randomRow = RandInt(dataGrid.firstVisibleRow, dataGrid.lastVisibleRow) [ ] LIST OF STRING randomRowItems = allVisibleItems[randomRow] [ ] print("This is the row we want to select: {randomRow}") [ ] [ ] // now lets construct the string we need for the select method [ ] STRING selectString [ ] STRING itemText [ ] INTEGER col = 0 [-] for each itemText in randomRowItems [-] if col == 0 [ ] selectString = "*{itemText}*" [-] else [ ] selectString = selectString + " | {itemText}" [ ] col++ [ ] [ ] // now lets select the item [ ] print("We will select {selectString}") [ ] dataGrid.Select(selectString)