Logo 
Search:

Asp.net Forum

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds

Using Validation for the Form along w ith the DataGrid

  Asked By: Ayden    Date: Aug 22    Category: Asp.net    Views: 761
  

I have a Problem here.I have a datagrid Including the
Authors List and a form to Add the Authors
Now I have But required field Validfators for First
Name and Last name to Add the fields
to the table which Loads the datagrid.Now when I
update the datagrid Make changes
and Press the update Button the required field
validators Fire,Which I dont want to happen
Nolw the CauseValidation Property is not there for
those Edit,Updater and cancel Buttons.

Can Anyone tell me How I Do this.I hope the question
is Clear I doubt my Explaining Skills.

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Allan Bailey     Answered On: Aug 22

You might not believe I have faced a similar situation yesterday. What I
have done is when getting into the Datagrid edit  mode, I disable all the
validators set for adding rows and then enable it at the end of update  or
cancel click of the grid. You may also put it in gridbind or any other
method that you call after update/cancel. This would work.

 
Answer #2    Answered By: Baylen Smith     Answered On: Aug 22

Thanx for Giving me the Solution for
datagrid,But Suppose that there are 20 Validators
On that Page then I will have to write 20 Lines
Disabling the Validators and if I Disbale the
Validator at Page level then If there is any
Validations in the datagrid  During the Edit mode
Also wont Fire.Does Neone have a Compact Solution for
the same.

 
Answer #3    Answered By: Lughaidh Fischer     Answered On: Aug 22

Well still to get enlightened with any other method for doing the same. By
the way could you figure out how to put validation  controls on a datagrid
during edit  mode?

 
Didn't find what you were looking for? Find more on Using Validation for the Form along w ith the DataGrid Or get search suggestion and latest updates.




Tagged: