Link to home
Start Free TrialLog in
Avatar of MCallas
MCallasFlag for United States of America

asked on

GridView CompareValidator Fails

Dear Experts,
I have a GridView inside a panel (see submitted code) with a CompareValidator in a template field. However, when I enter a value that should cause an error and click on Update, it simply accepts the value and saves the record. I have a similar CompareValidator in another GridView on the same page (but not within a panel) and it works fine. Any ideas?
Thanks.
MCallas
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Avatar of MCallas

ASKER

CodeCruiser,
Thanks for the links, though I had already read the first link before you sent it. In fact, I have spent several hours today reading and looking for a solution for my particular problem. I know how to add validation to the GridView. In fact, validation in one of the GridViews is working just fine. However, two other GridViews on the same page that are set up identically don't work. The two that don't work are inside Panel controls, and I was hoping someone could shed some light on this. I only resort to asking questions when my diligent research comes up empty for the problem at hand. I know that sometimes a link can lead to a solution, but in this case, neither one did.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of MCallas

ASKER

TheLearnedOne,
Thanks. Your comment makes perfect sense. I appreciate your input and understand now why this question has received so little attention.
MCallas
MCallas, Could you send the submitted code?  I cannot find it on this question.

"I have a GridView inside a panel (see submitted code) with a CompareValidator in a template field"

Thanks
Avatar of MCallas

ASKER

TheLearnedOne,
I had removed all but the working validator last week. Today, when I added the same validators to the other GridViews, I was careful to duplicate the original with the exception of the control ID's. Everything works as expected. Thanks again for your insight.
MCallas