Search code examples
apache-flexhierarchical-dataadvanceddatagrid

Setting Closed Nodes for AdvancedDataGrid from a Separate File


I'm trying to set specific closed nodes in my AdvancedDataGrid, and I know you would normally do so using the expandItem() property with the grid. However, I'm obtaining the Hierarchical Data in a separate file, so I'm having difficulty trying to access the data grid from within the adapter file I created for the hierarchical data. Any help would be greatly appreciated.


Solution

  • I found the answer. Apparently, the dataProvider property of the AdvancedDataGrid actually uses the HierarchicalCollection class, so you can use the showItem(); function to access objects that are nodes without having to be in Hierarchical Data.

    Example:

    AdvancedDataGridName.dataProvider.showItem(object);