我将如何保持树形控件的状态? 我想它崩溃,以保持树的状态时,它的数据提供者获取更新,而不是。
How would I go about keeping the state of a tree control? I'd like to keep the state of the tree when it's data provider gets updated, instead of it collapsing.
怎么是这样的:
var openItems:Object = tree.openItems;
tree.dataProvider = myNewDataProvider;
tree.openItems = openItems;
tree.validateNow();
我不知道有多好,这将工作,如果新的dataProvider是从旧的完全不同,但它的工作原理,当你延迟加载树节点。
I'm not sure how well this will work if the new dataProvider is radically different from the old one, but it works when you're lazy loading tree nodes.