GridView Update fails when RequierdFieldValidator is added

U

Uri Goldstein

Hello.

I have a GridView with a TemplateField that has an EditItemTemplate
defined. The GridView worked well against an ObjectDataSource up until
a point when I added a RequiredFieldValidator to the EditItemTemplate.
Once I did this, the Update LinkButton on the page fails to submit the
page to the server.

I've noticed that once the RequiredFieldValidator is added, the Update
LinkButton uses the function "WebForm_DoPostBackWithOptions()" instead
of the function "__doPostBack()". This is probably the cause of the
problem, but how do I overcome this?

Finally, I've noticed something really odd. The same thing happens when
I add a RequiredFieldValidator to a FormView that I additionally have
on the page and that is connected to the same ObjectDataSource as the
GridView.

Can anyone show me the way out of this curious behavior?


Thank you,
Uri Goldstein.
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top