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>
<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
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>
<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