Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Treeview sorting
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Treeview sorting

 Post Reply Post Reply
Author
Message Reverse Sort Order
b4db0yb4d View Drop Down
Newbie
Newbie
Avatar

Joined: 09 October 2010
Location: bangladesh
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote b4db0yb4d Quote  Post ReplyReply Direct Link To This Post Topic: Treeview sorting
    Posted: 09 October 2010 at 2:07pm
try this.................Wink
  
Dim tvn As Node
    Dim tvn2 As Node

   sName = 1

   Set tvn = TreeView1.Nodes(sName)
    tvn.Sorted = False

   chil = tvn.Children: If chil = 0 Then Exit Sub     ' if no children the exit
   Set tvn = tvn.Child.LastSibling
    
   For a = 1 To chil
    Set tvn2 = tvn
    
    Set tvn = tvn.Previous
    TreeView1.Nodes.Remove tvn2.Index
    
    'MsgBox tvn2
    
    TreeView1.Nodes.Add sName, 4, tvn2.Key, tvn2
   Next
i dnt knw it will help u or not Cry
Back to Top
ewink View Drop Down
Newbie
Newbie
Avatar

Joined: 14 July 2010
Location: Indonesia
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote ewink Quote  Post ReplyReply Direct Link To This Post Posted: 14 July 2010 at 3:31pm
Originally posted by Baldur Baldur wrote:

You must than add the nodes in sorted order.


Could you explain more details ??


I also want to sort based on image
Never GiveUP !!!
Back to Top
Baldur View Drop Down
Senior Member
Senior Member


Joined: 22 November 2006
Location: Germany
Status: Offline
Points: 244
Post Options Post Options   Thanks (0) Thanks(0)   Quote Baldur Quote  Post ReplyReply Direct Link To This Post Posted: 15 March 2010 at 12:13pm
You must than add the nodes in sorted order.
Back to Top
alen11 View Drop Down
Newbie
Newbie
Avatar

Joined: 21 July 2009
Location: Indonesia
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote alen11 Quote  Post ReplyReply Direct Link To This Post Posted: 28 February 2010 at 1:44am
Hey...any body know how do i sort the treeview node manually?

because beside i want to sort treeview by the alphabet i also want to sort treeviewnode by image

so please somebody help me,i use vb6..thanks
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.108 seconds.