Heena
Heena

Reputation: 754

how to restrict validatin check on gridview button click in c#?

I have form that have some fields with requireFieldValidation and also Gridview with edit and cancel button

When I try to edit gridview it asks me for fullfill requireFieldValidation first.

I have some idea that I need to change some property to true to false in gridview but not exaclty knowing what?

Am I right? Or need some code to restrict this validation on gridview edit?

Upvotes: 0

Views: 269

Answers (2)

KV Prajapati
KV Prajapati

Reputation: 94645

To ignore the validation rules added via ASP.NET Validation Control for the Button/LinkButton/ImageButton, set value of CausesValidation property to false. Also set ValidationGroup property for each control, it allow you to organize validation controls on a page as a set.

Upvotes: 1

kmcc049
kmcc049

Reputation: 2801

Set CausesValidation='false' on the edit button

Upvotes: 0

Related Questions