In my application, I have a datagrid that is bound to RemoteObject. The datagrid has a corresponding form that contains the details. When the user clicks on a row in the datagrid the form populates with the values from the DataGrid's selectedItem.
I want to programatically select some row in my DataGrid when the application loads.
In order to do this, I have to call validateNow() and scrollToIndex()
dg.selectedIndex = i; dg.validateNow();
I put this code in the Applications creationComplete handler.
This all works great - the desired row is highlighted and selected and the selectedIndex is i. The problem is that I can't access the data to populate the details form. When I try to retrieve the dg.SelectedItem property - it is null.
How does one programatically select some row in the grid on load AND access the row data?
Thanks for your reply.
I have searched this issue from Bug and Issue Management System.I did find a similar bug in <mx:List> ,see SDK-4782,But not Datagrid.I'm using SDK 3.2,is there any way to resolve it?