Stop datagrid causing validation

G

Geoff Murley

I have a Datagrid with the first Column as Edit. Clicking
on Edit displays the usual Update and Cancel
Links/Buttons. However, after I click on Edit and then
change my data, when I click on Update the Link/Button
Causes Validation on 2 Empty Text boxes further down the
page which are used only for adding a new Row. So how do
I prevent the Update Link/Button from Causing Validation
and firing the Required Field Validators on the textboxes?
 
B

Brock Allen

You'll have to build your own TemplateColumn and add in those Edit/Cancel/Update
buttons yourself. On the Buttons add the CausesValidation=false property.
For the Buttons to work with the DataGrid you'll need to set their CommandName="Edit",
CommandName="Cancel" and CommandName="Update" so the grid knows that they
were clicked.
 

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,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top