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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Asp Tree with "Intelligent Sorting"

Asp Tree with "Intelligent Sorting"

Scheduled Pinned Locked Moved ASP.NET
databasedata-structurestutorialcsssysadmin
3 Posts 1 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.
  • B Offline
    B Offline
    bazpaul
    wrote on last edited by
    #1

    Hey everyone, Im pretty much a n00b to asp but have a bit of programming experience. Im currently workin on a little project for work which is driving me insane! I didnt want it to come to this (asking experts for help) but i feel the project needs some fresh eyes to guide me to a better solution. So let me just outline what im trying to do; First, we have a large list of customers on our server, approx 1316 customers. Now on our intranet webpage i wish to create a fast way of finding customers using an ASP tree. So consider a list of customer names returned from an SQL query into a large array. I then wish to check the first couple of letters of each customer, and group customers with similiar names together under one branch in the tree. The Result would look something like this; Customers | |-A ___|-ar ______-arson, pat ______-arson, mick ______-arsen, jon ______... ______... ___|-as ______-asnot, mark ______... ______... ___|-Other A's ______... ______... |-B ___|-ba ______|-bai __________-bailey, john __________-bailey, mark __________... __________... ______|-bar __________-barker, paul __________-barton, mike __________... __________... ___|-br ______-bromich, dave ______-brockurst, mick ______... ______... ___|-Other B's ______... ______... |-C ___-charles, john ___-chaplin, pat ______-chan, johnny |-D ___|-da . . . .... just to explain anything with a | beside it represents a branch which has leaves while anythin with just - represents a leaf which will hold a customer name One main important thing about this code is that i want it to be very dynamic and one important feature is groups of similar names, being grouped in their own branch. For example the code should read like; if there are less than X names beginning with 'ar' then group these names under a branch called 'ar' But if there are more than X names beginning with 'ar' then search again through this group and compare the first 3 letters for similarity. This idea is shown in the B section, here the code found more than X names with -ba as the first two letters, and so and the code ran again comparing the first three letters, these groups of three letters had less hits than X and so are plotted in their own trees -bai and -bar. I hope you can follow me now as you read this and it makes some sort of sense! I want it to be so dynamic that lets say, we enter many customers with names starting with -bai, the program will then scan the first four letter

    B 1 Reply Last reply
    0
    • B bazpaul

      Hey everyone, Im pretty much a n00b to asp but have a bit of programming experience. Im currently workin on a little project for work which is driving me insane! I didnt want it to come to this (asking experts for help) but i feel the project needs some fresh eyes to guide me to a better solution. So let me just outline what im trying to do; First, we have a large list of customers on our server, approx 1316 customers. Now on our intranet webpage i wish to create a fast way of finding customers using an ASP tree. So consider a list of customer names returned from an SQL query into a large array. I then wish to check the first couple of letters of each customer, and group customers with similiar names together under one branch in the tree. The Result would look something like this; Customers | |-A ___|-ar ______-arson, pat ______-arson, mick ______-arsen, jon ______... ______... ___|-as ______-asnot, mark ______... ______... ___|-Other A's ______... ______... |-B ___|-ba ______|-bai __________-bailey, john __________-bailey, mark __________... __________... ______|-bar __________-barker, paul __________-barton, mike __________... __________... ___|-br ______-bromich, dave ______-brockurst, mick ______... ______... ___|-Other B's ______... ______... |-C ___-charles, john ___-chaplin, pat ______-chan, johnny |-D ___|-da . . . .... just to explain anything with a | beside it represents a branch which has leaves while anythin with just - represents a leaf which will hold a customer name One main important thing about this code is that i want it to be very dynamic and one important feature is groups of similar names, being grouped in their own branch. For example the code should read like; if there are less than X names beginning with 'ar' then group these names under a branch called 'ar' But if there are more than X names beginning with 'ar' then search again through this group and compare the first 3 letters for similarity. This idea is shown in the B section, here the code found more than X names with -ba as the first two letters, and so and the code ran again comparing the first three letters, these groups of three letters had less hits than X and so are plotted in their own trees -bai and -bar. I hope you can follow me now as you read this and it makes some sort of sense! I want it to be so dynamic that lets say, we enter many customers with names starting with -bai, the program will then scan the first four letter

      B Offline
      B Offline
      bazpaul
      wrote on last edited by
      #2

      Can any1 help please, i just need some advice on the best approach to this problem!

      B 1 Reply Last reply
      0
      • B bazpaul

        Can any1 help please, i just need some advice on the best approach to this problem!

        B Offline
        B Offline
        bazpaul
        wrote on last edited by
        #3

        Since no-one knows how to do this can anyone direct me to a webpage or an .asp script that could do this! Is there a name for this kind of sorting?

        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