This is a migrated thread and some comments may be shown as answers.

[Solved] validation on formview with radgrid

3 Answers 127 Views
Grid
This is a migrated thread and some comments may be shown as answers.
COURTNEY LYNCH
Top achievements
Rank 1
COURTNEY LYNCH asked on 09 Jun 2009, 04:29 PM
I have a formview insert with several required field validators.  Below that I have a radgrid with edit and updates enabled.  On update of the grid, how do I prevent the required fields in my formview from validating and preventing the update?  Appreciate any help!

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 10 Jun 2009, 04:35 AM
Hi,

I am afraid whether I understood your question correctly. If you want to prevent required fields in the formview from validating on clicking the Update button you may set the CausesValidation property of the Update button to false.

        
 <asp:Button ID="Button2" CausesValidation="false" runat="server" Text="Update" /> 


Shinu
0
COURTNEY LYNCH
Top achievements
Rank 1
answered on 10 Jun 2009, 01:29 PM
Sorry if I wasn't clear.  The problem is that when I click update in the radgrid, it tries to validate the formview's required fields.  I have tried changing the causes validation on the update linkbutton in the radgrid to false, but it still tries to validate the formview fields. I'm using the formview for insert only.   Appreciate your help.
0
COURTNEY LYNCH
Top achievements
Rank 1
answered on 10 Jun 2009, 03:13 PM
Okay, using validation groups seems to work.  Sorry, I'm a newbie!
Tags
Grid
Asked by
COURTNEY LYNCH
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
COURTNEY LYNCH
Top achievements
Rank 1
Share this question
or