×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

insert node in treelist at specific position

insert node in treelist at specific position

insert node in treelist at specific position

(OP)
Dear all
I am trying to insert a node into a TreeListMenu. It can successfully add nodes into a tree, at different level - using parent and child relationship. The function I am using is:
this->tree_control0->InsertNode(CurrentNOde, ParentNode, NULL, Tree::NodeInsertOptionAlwaysFirst); 


However, the order of the nodes within the same level goes as the default order, no matter how I insert them. For example, if I would like to list a tree as (L0=level 0, L1=level 1):
_L0: a
___L1: b
___L1: c
_L0: d

where 'a' and 'b' are parent nodes, but 'b' and 'c' are child nodes of node 'a'. The problem is, no matter I insert 'b' first or 'c' first, it will always be displayed as 'c' listed after 'b'. This seems to follow apathetic order. (if I change the name of 'b' to be 'm' for example, the list will automatically updated as 'm' after 'c' in Level 1(L1).


Could anyone suggest a method that I may list the tree nodes in the way the user wanted but rather than default? I tried to change the option 'NodeInsertOptionAlwaysFirst' as other options, it doesn't help.

Many thanks
Gan

RE: insert node in treelist at specific position

While inserting a column the default is 'ColumnSortOptionAscending'. After inserting the column set 'columnsortoption' to 'unsorted'.

Suresh
www.technisites.com.au

RE: insert node in treelist at specific position

(OP)
Hi Ufsure

Thanks for the reply. Yes, this solved the problem.

Many thanks!
Gan

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources