简体   繁体   中英

Flex Tree persist sorting and handle drag and drop

I would like to persist the sort state of a flex tree to my database. I sort the tree items recursively using a sort object on the children list of each item in the tree. Thus the sorting works fine. However, when I now drag and drop things it appears that the tree is sorted using those sort functions and not dropping the item at the position I want it to.

Is there any best practice to handle drag & drop and sorting functions on trees?

I also tried to set the sort to null after refreshing my list, but then drag and drop throws weird errors.

If it helps I can post some code, however I am rather looking for a best practice approach to handle this. If there is anything you could point me to I would really appreciate.

Regards

Suggestion: - Post some code, so that people can save there time while helping you and can have clear picture what exactly you are looking for. If possible explain you issue step by step.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM