Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. String Search on a Treeview

String Search on a Treeview

Scheduled Pinned Locked Moved C#
data-structurescsharpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jhrbek
    wrote on last edited by
    #1

    I'm tring to think of a fast way to perform a string search on a treeview. I'm reading in a hierarical CSV file and inserting it into a tree for easy viewing. For some elements of my code I need to find "needle" in this giant haystack. I've thought of extending the treeview to integrate with a ternary search tree of some sort, but that seems really complicated to me. Linear searches of the tree seem like a really bad idea considering my CSV is in upwards of 9,000 lines. It's a lot of data so I need a fast way to search. I'd prefer to have an array with the keys indexed as unique strings. Good/bad idea? I'm pretty new to c# and this is proving much more difficult than I thought it would. Any suggestions or examples would be greatly appreciated!!

    J 1 Reply Last reply
    0
    • J jhrbek

      I'm tring to think of a fast way to perform a string search on a treeview. I'm reading in a hierarical CSV file and inserting it into a tree for easy viewing. For some elements of my code I need to find "needle" in this giant haystack. I've thought of extending the treeview to integrate with a ternary search tree of some sort, but that seems really complicated to me. Linear searches of the tree seem like a really bad idea considering my CSV is in upwards of 9,000 lines. It's a lot of data so I need a fast way to search. I'd prefer to have an array with the keys indexed as unique strings. Good/bad idea? I'm pretty new to c# and this is proving much more difficult than I thought it would. Any suggestions or examples would be greatly appreciated!!

      J Offline
      J Offline
      jhrbek
      wrote on last edited by
      #2

      I found this on the msgboard - any other suggestions or is there a faster way? http://www.codeproject.com/script/comments/forums.asp?msg=1164592&forumid=1649&ForumID=1649&XtraIDs=1649&searchkw=treeview&sd=6/17/2002&ed=9/15/2005&Page=2#xx1164592xx

      A 1 Reply Last reply
      0
      • J jhrbek

        I found this on the msgboard - any other suggestions or is there a faster way? http://www.codeproject.com/script/comments/forums.asp?msg=1164592&forumid=1649&ForumID=1649&XtraIDs=1649&searchkw=treeview&sd=6/17/2002&ed=9/15/2005&Page=2#xx1164592xx

        A Offline
        A Offline
        Alomgir Miah
        wrote on last edited by
        #3

        have a look on the url's below http://www.dotnet247.com/247reference/msgs/32/161524.aspx http://support.microsoft.com/default.aspx?scid=KB;EN-US;311318 Live Life King Size Alomgir Miah

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups