a datagrid that just won't stop Validating :(
-
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:
-
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:
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