Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Turn off validation for DataGrid EditButton

Author  Topic 

Billkamm
Posting Yak Master

124 Posts

Posted - 2006-03-14 : 08:56:08
I have an EditButton with my datagrid that is on the same page that contains RegularExpressionValidators. However, when I click the Update button after editing a row in the datagrid it gets stopped by the validators. How may I turn off the Update button going up against the validators (which are for other controls that a treated separately from the datagrid during postback)

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2006-03-14 : 09:04:11
just set CausesValidation=False for the button.

When in doubt, browse the available properties for an object, usually you can find what you are looking for.
Go to Top of Page

Billkamm
Posting Yak Master

124 Posts

Posted - 2006-03-14 : 09:55:49
There was no CausesValidation=false for this button because it was part of the datagrid and that was not an option. I ended up converting the column to a Template Column and then I could add the CasuesValidation property to the buttons I added.

Thanks for the help.
Go to Top of Page

jhermiz

3564 Posts

Posted - 2006-03-14 : 11:34:17
quote:
Originally posted by Billkamm

There was no CausesValidation=false for this button because it was part of the datagrid and that was not an option. I ended up converting the column to a Template Column and then I could add the CasuesValidation property to the buttons I added.

Thanks for the help.



It's usually a good idea to simply use template columns, they are a lot more flexible than your standard columns on the grid.

Jon



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]

RS Blog -- [url]http://weblogs.sqlteam.com/jhermiz[/url]
Go to Top of Page
   

- Advertisement -