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. Web Development
  3. ASP.NET
  4. Filtering ListBox into Other ListBox

Filtering ListBox into Other ListBox

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorialquestion
5 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.
  • M Offline
    M Offline
    Mr Wonderful
    wrote on last edited by
    #1

    Hi, I have Two ListBoxes, The First One filtering the Countries using list of item from the database, the other filtered with cities of each country. the Problem when I click on The Country it's Cities Filtered into other List Box, when I click Again on the same Country it's Cities Filtered again in the listbox, How to Prevent this ?. Regards

    E 1 Reply Last reply
    0
    • M Mr Wonderful

      Hi, I have Two ListBoxes, The First One filtering the Countries using list of item from the database, the other filtered with cities of each country. the Problem when I click on The Country it's Cities Filtered into other List Box, when I click Again on the same Country it's Cities Filtered again in the listbox, How to Prevent this ?. Regards

      E Offline
      E Offline
      eyeseetee
      wrote on last edited by
      #2

      Clear the list before you fill it each time i.e. datalist.clear(); something like that

      We are not a Code Charity

      M 1 Reply Last reply
      0
      • E eyeseetee

        Clear the list before you fill it each time i.e. datalist.clear(); something like that

        We are not a Code Charity

        M Offline
        M Offline
        Mr Wonderful
        wrote on last edited by
        #3

        I need to allow multiple Selection so I can't clear the the list before fill it each time, otherwise I can use just DataSource and bind the data to it. I need other Solution :) Regards

        E 1 Reply Last reply
        0
        • M Mr Wonderful

          I need to allow multiple Selection so I can't clear the the list before fill it each time, otherwise I can use just DataSource and bind the data to it. I need other Solution :) Regards

          E Offline
          E Offline
          eyeseetee
          wrote on last edited by
          #4

          Run a query to check if the values already exist in the other list, if so dont add, if not add. Try something like that

          We are not a Code Charity

          M 1 Reply Last reply
          0
          • E eyeseetee

            Run a query to check if the values already exist in the other list, if so dont add, if not add. Try something like that

            We are not a Code Charity

            M Offline
            M Offline
            Mr Wonderful
            wrote on last edited by
            #5

            MayBe Thats Work, I will try To do it. Thanks

            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