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
165
SortByPosition
posted

Using NetAdvantage 2010 volume 2.

I want to display the list of selected nodes in the same order that they appear in the tree instead of the selected order which is the default behaviour.

The description of the function "SortByPosition" of the SelectedNodes collection is "Sorts the SelectedNodes collection such that members appear in the same order that they do in the tree."

So I would expect the nodes in the collection to be sorted in the same way that they appear in the tree from top-down but that does not seem to be the case.

In the following example, I would have expect the nodes to be sorted this way :

"Node0, Node6, Node8, Node10, Node3"

But the result is far different and I cannot figure the resulting sorting that is applied.

Is this a bug, or did I misunderstood the behaviour of that function?

Thanks

Sylvain

Parents
  • 469350
    Offline posted

    Hi Sylvain,

    SortByPosition is supposed to sort the nodes in the order in which they appear on the tree. If they are coming out in the order you show in the screen shot here, then something is clearly wrong.

    I suspect the issue is that the SortByPosition method was added long before the tree had the ability to allow selection across different nodes collections. To test this out, I tried selecting nodes in the same collection, like Node3, Node2, and Node0. When I do this, it works fine.

    So I consider this a bug and I'm going to ask Infragistics Developer Support to write this up for developer review.

Reply Children
No Data