If I understand your question correctly, you need to find real drop position to add tree element. Most common issue is that people use getDropLocation and do not look at getDropParent. Something like this usually solves the issue:
function getRealDropLocation() {
 dropLoc = tv_1.getDropLocation();
 dropParent = tv_1.getDropParent();
// Logger.trace(dropLoc + ":" + dropParent);
// Logger.trace("!!!" + dropLoc + ":" + tv_1.getItemAt(0));
 var i;
 for ( i = 0; i < tv_1.rowCount;  i++)
  if ( dropParent == tv_1.getItemAt(i) ) {
   dropLoc+=i;
   break;
  }
}
Sorry if I misunderstand your question - posting code would be a way to see the problem if it is different from the above.
HTH,
Anatole Tartakovsky
----- Original Message -----
Sent: Wednesday, January 25, 2006 8:23 AM
Subject: [flexcoders] Could someone please confirm this (Tree, Dragdrop, e4x with FLEX 2.0)?

Has anyone used a tree control and e4x data returned from web service,
and implemented drag and drop node positioning successfully?

Can anyone confirm there is a bug ?

The control won't place the dropped node in the right place. It always
appears at the bottom of the parent node. However in the data source
xml, the node is in the correct place. It seems the tree is not
refreshing properly in relation to data source changes.

If anyone has got this working properly can that person please share
the secretÂ…?

I feel that I am wasting my time trying different variations with no
success.

Thanks

Jason Hawryluk








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to