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. CheckBox List

CheckBox List

Scheduled Pinned Locked Moved ASP.NET
4 Posts 4 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.
  • W Offline
    W Offline
    w13RTH70Lo
    wrote on last edited by
    #1

    hi, i have a checkbox list, and having values like, Company1 ---------------- 1 - car 2 - bus 3 - both Company2 ------------------ 1 - car 2 - bus 3 - both Company3 ------------------ 1 - car 2 - bus 3 - both and these values are repeating for many Companies so my client can select Car or Bus or Both from a Company, but what if he/she selects Both then logically the Car or Bus Option should not be selectable, how i can achieve that.

    I love .NET

    S I P 3 Replies Last reply
    0
    • W w13RTH70Lo

      hi, i have a checkbox list, and having values like, Company1 ---------------- 1 - car 2 - bus 3 - both Company2 ------------------ 1 - car 2 - bus 3 - both Company3 ------------------ 1 - car 2 - bus 3 - both and these values are repeating for many Companies so my client can select Car or Bus or Both from a Company, but what if he/she selects Both then logically the Car or Bus Option should not be selectable, how i can achieve that.

      I love .NET

      S Offline
      S Offline
      SABhatti
      wrote on last edited by
      #2

      if you have only these options then use radiobuttonlist instead of checkboxlist. If you still want to use the checkbox then you have to write a javascript code for onclick and check which checkbox was clicked and uncheck all other checkboxes.

      -----

      1 Reply Last reply
      0
      • W w13RTH70Lo

        hi, i have a checkbox list, and having values like, Company1 ---------------- 1 - car 2 - bus 3 - both Company2 ------------------ 1 - car 2 - bus 3 - both Company3 ------------------ 1 - car 2 - bus 3 - both and these values are repeating for many Companies so my client can select Car or Bus or Both from a Company, but what if he/she selects Both then logically the Car or Bus Option should not be selectable, how i can achieve that.

        I love .NET

        I Offline
        I Offline
        Imran Khan Pathan
        wrote on last edited by
        #3

        You should take radioButton list insted of checkbox list. If client select both there is no need to select car or bus.So u can achive this by radiobutton list Best Regards Pathan

        GOD HELP THOSE WHO HELP THEMSELF

        1 Reply Last reply
        0
        • W w13RTH70Lo

          hi, i have a checkbox list, and having values like, Company1 ---------------- 1 - car 2 - bus 3 - both Company2 ------------------ 1 - car 2 - bus 3 - both Company3 ------------------ 1 - car 2 - bus 3 - both and these values are repeating for many Companies so my client can select Car or Bus or Both from a Company, but what if he/she selects Both then logically the Car or Bus Option should not be selectable, how i can achieve that.

          I love .NET

          P Offline
          P Offline
          postmaster programmingknowledge com
          wrote on last edited by
          #4

          More on different data control.. http://www.programmingknowledge.com/dataControl.aspx[^]

          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