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. Web Development
  3. ASP.NET
  4. a datagrid that just won't stop Validating :(

a datagrid that just won't stop Validating :(

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netannouncement
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.
  • G Offline
    G Offline
    gamerPotatoe
    wrote on last edited by
    #1

    I have an ASP.NET page with a couple of textboxes and a editable datagrid. A button on the page enters the contents of the textboxes into a datatable and then binds the datagrid to the datatable - no problems here. The thing is that I have associated a couple of requiredvalidators to the textboxes. And whenever I try to edit the datagrid by clicking on the update link of the corresponding row on the datagrid, the requiredvalidators on the external textboxes flare up preventing the form from being submitted. Is there a way to set up the datagrid so that it doesn't 'cause validation' when in editable mode. :sigh:

    J 1 Reply Last reply
    0
    • G gamerPotatoe

      I have an ASP.NET page with a couple of textboxes and a editable datagrid. A button on the page enters the contents of the textboxes into a datatable and then binds the datagrid to the datatable - no problems here. The thing is that I have associated a couple of requiredvalidators to the textboxes. And whenever I try to edit the datagrid by clicking on the update link of the corresponding row on the datagrid, the requiredvalidators on the external textboxes flare up preventing the form from being submitted. Is there a way to set up the datagrid so that it doesn't 'cause validation' when in editable mode. :sigh:

      J Offline
      J Offline
      Jeff Martin
      wrote on last edited by
      #2

      Go to your DataGrid columns, select the Edit column and change the property "Causes Validation" to false. A nice feature of .Net 2.0 is the use of validation groups. So you can have multiple validators on a page, but they are grouped so some will fire based on one event and others will fire for another. Jeff Martin My Blog

      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