Saturday, March 24, 2012

Validation from within DataGrid

Hi,

I was trying to set a RegularExpressionValidator in my EditItemTamplate of one of the comlumns of my DG. However, I do not want it to show any message beneth the textbox that it is validating in the EditItemTemplate, as in Edit mode I do not have all the textboxes in the editable columns not aligned properly b'cos of having this Validation Control in the same cell. I have a Validation Summary control and I want this Error message to show up in the Validation Summary Control. I'm not able to see any messages in validation summary ctrl upon entering any invalid data into the textbox inside my EditItemTemplate. Wouldn't the Validation summary control be available for a Validation control placed in an EditItemTemplate of the DataGrid??

Any ideas would be appreciated.

Thanks

ValidationSummary control displaysmessages only when an attempt to post the form is made, not when theindividual validators are executed due to focus shift. If you don'twant anything to be shown for an individual validator, set its Displayproperty to None.
Cheers

No comments:

Post a Comment