i have a AdvancedDataGrid coponent with some custom Rows. I have a limited number of rows visible within the component. The other rows can be accessed via a scrollbar. Within my application i have ha Save & Next Button which saves the actual selected record and iterates the Grid's selected item by 1 until the end. Unfortunately this procedure works only until i reach the end of the visible rows. After that the Grid crashes when i select the not visible row and try to scroll there programatically:
//Bad Crash
this.documentBrowser.dg.selectedIndex = index + 1;
this.documentBrowser.dg.validateNow();
this.documentBrowser.dg.scrollToIndex(this.dg.selectedIndex);
I found out that the next element isn't instanciated in that moment. Is there any possibility to render all items in the grid after loading or to deactivate the lazy rendering?
The stack trace:
TypeError: Error #1010: A term is undefined and has no properties. at mx.controls.listClasses::AdvancedListBase/makeRowsAndColumnsWithExtraRows()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as:4008] at mx.controls.listClasses::AdvancedListBase/updateDisplayList()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as:3582] at mx.controls::AdvancedDataGridBaseEx/updateDisplayList()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as:2033] at mx.controls::AdvancedDataGrid/updateDisplayList()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGrid.as:2907] at mx.controls.listClasses::AdvancedListBase/validateDisplayList()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/advancedgrids/src/mx/controls/listClasses/AdvancedListBase.as:3480] at mx.managers::LayoutManager/validateDisplayList()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/LayoutManager.as:744] at mx.managers::LayoutManager/doPhasedInstantiation()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/LayoutManager.as:827] at mx.managers::LayoutManager/doPhasedInstantiationCallback()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/LayoutManager.as:1195]