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. C#
  4. datagridview cells

datagridview cells

Scheduled Pinned Locked Moved C#
json
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.
  • C Offline
    C Offline
    CandyMe
    wrote on last edited by
    #1

    I have a datagridview which allows users to enter new values for each column. But what I would really like is to prevent the user to add value to other columns if column MSISDN is still empty. which means, user must FIRST add MSISDN value before filling up the rest. Is there anyway where I can prevent the cursor or prevent setting focus to cell before anything else. THANKs!!!!

    B 1 Reply Last reply
    0
    • C CandyMe

      I have a datagridview which allows users to enter new values for each column. But what I would really like is to prevent the user to add value to other columns if column MSISDN is still empty. which means, user must FIRST add MSISDN value before filling up the rest. Is there anyway where I can prevent the cursor or prevent setting focus to cell before anything else. THANKs!!!!

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

      simply use "CellValidating" event for other columns. in this event check whether if your MSISDN column is empty then set cancel to true.

      C 1 Reply Last reply
      0
      • B Bobby887

        simply use "CellValidating" event for other columns. in this event check whether if your MSISDN column is empty then set cancel to true.

        C Offline
        C Offline
        CandyMe
        wrote on last edited by
        #3

        thank you =)

        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