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. Visual Basic
  4. Validating a listView

Validating a listView

Scheduled Pinned Locked Moved Visual Basic
tutorial
7 Posts 3 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.
  • A Offline
    A Offline
    AAGTHosting
    wrote on last edited by
    #1

    I need to be able to validate the list View. I need to know how to check and see if the user did not check a box.

    P 1 Reply Last reply
    0
    • A AAGTHosting

      I need to be able to validate the list View. I need to know how to check and see if the user did not check a box.

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #2

      Just have a boolean value set to true or false based on if a box has been checked. Set the boolean value in an event procedure that is fired when the box is checked. That is my quick stab at it, without any detailed code or description of what you are trying to do.

      "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

      A 1 Reply Last reply
      0
      • P Paul Conrad

        Just have a boolean value set to true or false based on if a box has been checked. Set the boolean value in an event procedure that is fired when the box is checked. That is my quick stab at it, without any detailed code or description of what you are trying to do.

        "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

        A Offline
        A Offline
        AAGTHosting
        wrote on last edited by
        #3

        This is my validation if statement. When I debug I get an error. Can you give me an example of how to check for a checked item using the boolean value?

        If lvwRent.CheckedItems(0).Text Is "" Then

        L 1 Reply Last reply
        0
        • A AAGTHosting

          This is my validation if statement. When I debug I get an error. Can you give me an example of how to check for a checked item using the boolean value?

          If lvwRent.CheckedItems(0).Text Is "" Then

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          why would you need Text? just look at the count of the items in lvwRent.CheckedItems :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          Voting for dummies? No thanks. X|


          P 1 Reply Last reply
          0
          • L Luc Pattyn

            why would you need Text? just look at the count of the items in lvwRent.CheckedItems :)

            Luc Pattyn [Forum Guidelines] [My Articles]


            Voting for dummies? No thanks. X|


            P Offline
            P Offline
            Paul Conrad
            wrote on last edited by
            #5

            Thanks, Luc, you saved me from some code typing :-\

            "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

            L 1 Reply Last reply
            0
            • P Paul Conrad

              Thanks, Luc, you saved me from some code typing :-\

              "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              When code does not feel good, I'd prefer to remove some, rather than add some. :laugh:

              Luc Pattyn [Forum Guidelines] [My Articles]


              Voting for dummies? No thanks. X|


              P 1 Reply Last reply
              0
              • L Luc Pattyn

                When code does not feel good, I'd prefer to remove some, rather than add some. :laugh:

                Luc Pattyn [Forum Guidelines] [My Articles]


                Voting for dummies? No thanks. X|


                P Offline
                P Offline
                Paul Conrad
                wrote on last edited by
                #7

                I agree :-D

                "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

                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