datagrid regularexpressionvalidator - what went wrong?

V

venkat Murthy

Hi,

I have 10 regularexpression validators in my datagrid.

my datagrid looks like;

first5controls | boundcolumn | next5controls.

Regularexpressionvalidator for first five controls works fine. But, it
throws wierd errors when the error message is caught for next5controls.

Say, error is caught on control6 and control7, the same error is repeated in
all the next5controls.

my control code is like this. and the same is for all 10 controls with
different sort expressions and labels, and text and control to validate.

<asp:TemplateColumn SortExpression="SomeSort1" HeaderText=" This is fifth ">
<ItemTemplate>
<asp:Label id="lblSort" runat="server"
Text='<%#DataBinder.Eval(Container.DataItem, "SortOrder")%>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id="txtExchange" runat="server" Width="30px"
Text='<%#DataBinder.Eval(Container.DataItem, "SortOrder")%>'>
</asp:TextBox>&nbsp;
<asp:RegularExpressionValidator id="Regularexpressionvalidator6"
Width="125px" runat="server" CssClass="hr10" Display="Dynamic"
ErrorMessage="Please use only numbers"
ControlToValidate="txtExchange"
ValidationExpression="[0-9]"></asp:RegularExpressionValidator>
</EditItemTemplate>
</asp:TemplateColumn>

Can someone help me on this?

venkat.Murthy
 

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

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top