Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
550
Why can't SelectedNodesCollection be converted to TreeNodesCollection
posted

I am implementing the ability to cut/paste multiple nodes within a UltraWinTree. In order to do that, I need to save off the selectednodescollection to a an object. I know I can probably do this with multiple lines of code by either looping through the selectednodescollection or by using the array.copyto but why isn't it possible to convert the SelectedNodesCollection to TreeNodesCollection in one line of code. It doesn't make sense. I guess I just want confirmation if this insanity.

Parents
No Data
Reply
  • 69832
    Offline posted

    I can confirm that they are different types and that there is no way to "convert" one to the other. You are correct in your assumption that you can iterate them easily as they both have UltraTreeNode enumerators. I don't remember the reason why they are different types although the first thing that comes to mind is that the SelectedNodesCollection is used in the BeforeSelect event as well as the return type of the SelectedNodes collection, so it had different requirements than the TreeNodesCollection class.

Children