problem in RegularExpressionValidator in gridview

In ASP.NET 2.0 I have a gridview and a formview.
I need to check a field to contain one capital letter between  A-Z exclude O,L.
I use the  RegularExpressionValidator to check it.
In the cell of the formview it works fine.
In the cell of the gridview it throw an error on each input even if it is a correct letter.
What is the problem?
This is the code in the gridview that fires on each input:

 <asp:RegularExpressionValidator ID="REVAdvrtType" runat="server" ControlToValidate="TBAdvertTypeEdit"
 Display="Dynamic" ErrorMessage="Only A-Z exclude O,L"  ValidationExpression="[A-KMNP-Z]"
Width="154px" ></asp:RegularExpressionValidator>

thid is the code in the formview that works ok:

<asp:RegularExpressionValidator ID="REVAdvrtType" runat="server" ControlToValidate="TBAdvertType"
 Display="Dynamic" ErrorMessage="Only A-Z exclude O,L"  ValidationExpression="[A-KMNP-Z]" Width="154px"></asp:RegularExpressionValidator>
ANAT2403Asked:
Who is Participating?
 
ee_ai_constructCommented:
Closed, 500 points refunded.
ee_ai_construct
Community Support Moderator
replacement part #xm34
0
 
svyCommented:
Can post your gridview code?
0
 
ANAT2403Author Commented:
Ok I solve the problem . there where blanks in data so I made Trin and it solve the problem.
Thankyou
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.