I'm not sure if I got this right, but I think you're trying to retrieve the content of the first column of the i row.
What kind of objects are contained in the DataGrid dataProvider?
My guess would be that since you're trying to use the selectedItem (which is an Object) as an Array ( with a selectedItem ), the implicit cast from Object to Array fails and returns null.
Depending on what type of objcets are contained in your DataGrid, you should probably cast it correctly, then retrieve the field used in the first column.
For instance : id = ( dGrid.selectedItem as MyObject ).id; assuming that your MyObject class has an id property.
id = dGrid.selectedItem;is probably seen as id = ( dGrid.selectedItem as Array ); by Flex.
It could be
id = dGrid.selectedItem.id;
dGrid.selectedItem gives an object of that row.. you can access it by the above method.