Recently i’ve been messing about with Flash’s built in components, for the most part they are self explanatory and easy enough to figure out from Adobes docs. Recently however i have had to use editable DataGrids in a form type scenario, I could create and display a DataGrid fine, but when it came to collect the data from it? I was completely stumped, Mainly because DataGrids utilize loads of other classes, which can be very confusing.
So without any further words that you’ll no doubt skip
… heres a function that will return the data of the targeted cell.
function returnCellData(dataGrid:DataGrid, rowIndex:int, columnIndex:int):String
{
var cellData:String = dataGrid.columns[columnIndex].itemToLabel(dataGrid.getItemAt(rowIndex));
return cellData;
}
I’ve included an example for download here:
Hope this helped!
Peace Out




