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
255
sorting in tree view control
posted

Hi All,

I am a using a Infragistics TreeView control .

I kept all the nodes in the UltraTreeNode object(let us say "pnode") .

This pnode object is having lot of child nodes .

My problem is , i would like to sort pnode object before adding it to the TreeViewControl.

regards,

Faizal Ahmed.H

  • 28464
    posted

     o sort the contents of a tree, you invoke the Sort method of the Nodes collection. This method has two parameters. The descendants parameter specifies whether to sort all the nodes in the control, or only top-level nodes. If descendants is true, the control will navigate the hierarchy and sort the children of nodes. The second parameter specifies whether the sorting process will be case-sensitive.

    In Visual Basic:

    Private Sub SortAll_Click(ByVal sender As Object, ByVal e As System.EventArgs) _
      Handles SortAll.Click
        Me.UltraWebTree1.Nodes.Sort(True, False)
    End Sub

    In C#:

    private void SortAll_Click(object sender, System.EventArgs e)
    {
        this.UltraWebTree1.Nodes.Sort(true, false);
    }

     

  • 7694
    posted

     

    Hello,

    Could you please send a little bit more information.  ASPX declaration, code-behind - anything that can get us started is welcome.

    Thanks.