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. Prevent empty cells in datagridview

Prevent empty cells in datagridview

Scheduled Pinned Locked Moved C#
databasetutorialquestion
2 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.
  • Y Offline
    Y Offline
    Yustme
    wrote on last edited by
    #1

    Hi, I was wondering how i could prevent empty cells when the user adds a new row in the datagridview? Because the gridview is bouned to an sql database, some fields are not allowed to stay empty. Any idea how to get this trick done? Thanks in advance!

    C 1 Reply Last reply
    0
    • Y Yustme

      Hi, I was wondering how i could prevent empty cells when the user adds a new row in the datagridview? Because the gridview is bouned to an sql database, some fields are not allowed to stay empty. Any idea how to get this trick done? Thanks in advance!

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Just add validation, check if the cells are empty before doing a save, and if they are, tell them to fix them.

      Christian Graus Driven to the arms of OSX by Vista.

      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