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. Performing input validation on a datagridview column

Performing input validation on a datagridview column

Scheduled Pinned Locked Moved Visual Basic
question
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.
  • M Offline
    M Offline
    Mr Oizo
    wrote on last edited by
    #1

    Hi I have a column that should only allow the user to enter in integer values in the range 0-100. Only integers. How do I do this and where would I need to put the code. Mr oizo

    T 1 Reply Last reply
    0
    • M Mr Oizo

      Hi I have a column that should only allow the user to enter in integer values in the range 0-100. Only integers. How do I do this and where would I need to put the code. Mr oizo

      T Offline
      T Offline
      talasila80
      wrote on last edited by
      #2

      Replace the resular expression to an expression that only accepts numeric (^([0-9]*|\d*\d{1}?\d*)$) To allow only 0-100 use a custome validator just like regex and validate in code behind. Hope this helps

      T 1 Reply Last reply
      0
      • T talasila80

        Replace the resular expression to an expression that only accepts numeric (^([0-9]*|\d*\d{1}?\d*)$) To allow only 0-100 use a custome validator just like regex and validate in code behind. Hope this helps

        T Offline
        T Offline
        talasila80
        wrote on last edited by
        #3

        Sorry about the earlier message, here you go

        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