I have this code to add data to a grid.
After adding data, I want to go to the last row.
When I write dataGrid.dataProvider.length-1 it goes before last row.
But when I write dataGrid.dataProvider.length nothing happens.
What’s wrong?
var que3:Que = new Que();
createQueResult.token = queService.createQue(que3);
createQueResult.token =queService.commit();
createQueResult.token =queService.getAllQue();
dataGrid.ensureCellIsVisible(dataGrid.dataProvider.length-1,1);
I’m guessing that dataGrid.dataProvider.length is greater than the highested index. If the method ensureCellIsVisible is not showing the last row then it may be a bug in that method. You can try calling datagrid.validateNow() before or after that call and see if it helps.