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
Issue when adding a node (sort ascending)
posted

Hi there

I recently updated from version 8.3 to 9.1 (with update NetAdvantage_20091_CLR2X_WIN_SR_2023) and I got an issue using the tree.

An example is better to understand. In this example I've got a default nodes called 'BBBBBB'. When I click on my button I would like to add my new node called 'AAAAAA' and it should be the first one. It is the case but I can't see the node (out of the tree, I mean the drawing area):

public Form2()
{
    InitializeComponent();

    ultraTree1.Override.Sort = SortType.Ascending;

    // add nodes
    UltraTreeNode node1 = ultraTree1.Nodes.Add("BBBBBB", "BBBBBB");

}

private void button2_Click(object sender, EventArgs e)
{
      String itemName = "AAAAAAA";

      UltraTreeNode folderNode = ultraTree1.Nodes.Add();
      folderNode.Text = itemName;
      folderNode.Key = itemName;
}

 

The only workaround I found yet is doing that just after adding a node:

ultraTree1.Override.Sort = SortType.None;
ultraTree1.Override.Sort = SortType.Ascending;