This content has been marked as final. Show 4 replies
I faced the similar problem, and finally had a work around for that. See if that helps to you. It may not be the best of the solution.
So problem is that tree does not validate itself to and hence fails to calculate the dropindex.
I reset the dataprovider, and again expanded the tree.
Thank you for your approach.
The Problem is, that my dataProvider is an XMLListCollection with 1500 categories loaded from a remote-server. So i dont know if this solution will work for me but i will surely test it.
Edit: At which point of your drag and drop action do you reset the dataProvider?
Have you got maybe a simple file or code snippet for that?
Apologies for the delay due to weekends.
public function reset():void
/* reset the provider */
dataTree.dataProvider = dataManager.getDataModelArray();
/* set the root as selected, please note that selectedIndex i more reliable than selectedItem (from one of the flex authors, I believe */
dataTree.selectedIndex = 0;
dataManager.setSelectedDataNode(DataNode(dataTree.selectedItem)); // expand it DataNode is my class
Calling code is like this
As I wanted the same Item to be shown as selected, which was selected before resetting the dataprovider