I'm happily using an AdvancedDataGrid to display Hierarchical
What I now need to do is let the user type in a key value of
an item they wish to find, and then have the datagrid expand the
tree automatically and select the matching item.
Finding the item in the underlying dataset isn't hard.
However, I cannot figure out how to map this to whatever object the
ADG.expandItem() and / or HDV.openNodes() calls require. Merely
passing the data object to the expandItem() call doesn't do
Turns out, the HeirarchicalData objects aren't as smart as
The answer involves implementing a depth-first search across
the entire span, using a recursive iteration of any node that has
children until you find the node you want. At that point, build an
array of the nodes you've walked down into and pass the array to
the gridview.dataProvider.openNodes property. Followup up with a
scrollToIndex(gridview.selectedIndex) and you're golden.
As to why gridview.expandItem(item,..) doesn't do this for
you...I don't know.