Unfortunately currently there is no easy way to get a cell value for a datagrid.There is already an enhancement request logged for this http://bugs.adobe.com/jira/browse/FLEXENT-826 If this fix is important to you please vote on this.
As of now to access a cell value this is what you will need to do
- Use selectIndex to choose the particular row
- Use GetROProperty(“selecteditem”) to get the entire contents of that row
- Using the split function you can then split the row contents to the contents of each cell using | as the delimiter
Please find the sample code below
Browser(“Browser”).FlexApplication(“dg”).FlexPanel(“DataGrid Control Example”).FlexDataGrid(“dg1″).SelectIndex 0
RowContents =Browser(“Browser”).FlexApplication(“dg”).FlexPanel(“DataGrid Control Example”).FlexDataGrid(“dg1″).GetROProperty(“selecteditem”)
Hope this helps!