Results 1 to 2 of 2

Thread: Sort TreeView by Number

  1. #1

    Thread Starter
    Lively Member D.Viddy's Avatar
    Join Date
    May 2003
    Location
    Soldotna, Alaska
    Posts
    108

    Sort TreeView by Number

    I have nodes in a treeview that need to be sorted from least to greatest. For the life of me I can't find or figure out a good solution. I don't need to sort any of the subnodes, just one layer. Here are what the values look like:

    tvwApps.Nodes(0).Text = 1
    tvwApps.Nodes(1).Text = 45
    tvwApps.Nodes(2).Text = 18
    tvwApps.Nodes(3).Text = 19
    tvwApps.Nodes(4).Text = 4

    I only need to sort these one way and the values that I gave are just sample values. Can someone please help me, ASAP. So please show me how to sort them from least to greatest. Thank you much.
    ~Dylan
    ~http://www.codebend.net
    ~The place for Internet Development help.

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    top of the mountain
    Posts
    234
    Try first to sort values (convert in numbers) using some sort algorithm, and then fill treeview. Now u have sorted treeview.

    regard j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width