Datagrid - cancel Validation

M

Mikie

My app is doing all edits in the datagrid footer. The footer has some
columns with textboxes and validation controls that look at the
textboxes. THe footer also has a save button and a cancel button.

My problem is that when editing a new row in the footer all the
textboxes start out empty. If nothing is entered and the cancel button
is clicked (trapped for in a code behind ItemCommand event) all the
required field validators start complaining.

Looks like I need some sort of client side code to trap the cancel
click event and disable the validators? I don't know how to do that.

Also, if there is a way to code for that, is it possible to go ahead
and raise the original cancel clicked event so that the code behind
ItemCommand event (or some server-side sub) gets called and I can do
some additional clean up?

T.I.A.
 
O

Oleg Ogurok

Set the following property and it'll work:

MyCancelButton.CausesValidation = false

-Oleg.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top