dlarlick
asked on
CustomValidator in Datagrid ItemTemplate
I have a datagrid that has two item templates,
1.) with a drop down list
2.) with a textbox and CustomValidator
On the postback I am iterating through the datagrid and ensuring that the text box is filled for certian selections in the drop down list.
When I find one that is in error I set the custom validator as such.
validTest.ErrorMessage = "testing summary validator";
validTest.IsValid = false;
Unfortunately within the datagrid the validator does not appear "*" and the summary validator does not appear with the text.
If I use a CustomValidator in the same fashion and same section of code that resides outside of the datagrid, the validator works as I expected.
Anyone have any thoughts on this.
Thanks for the read.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you...
Will do the trick... I'll have to use a label next to the textbox, but I don't see any other alternatives.
Works well and solves another issue that I had nagging me elsewhere.
Gold Star!!
ASKER
Thanks for the post.
I will take a look later today when I have some time.