User31862606 posted
I'm having a editable grid view as shown below with a text box in item template and i'm getting a dataset from an oracle ref cursor and assigning it to the gridview datasource now i want to validate the textbox for required field validation and simultaniously
check whether the user entered a number instead of alphabets using regex?
anyone who has ideas are welcomed to share their thoughts below is the gridview control design(source)
thanks in advance
jeeva
<asp:GridView ID="gvRevenue" runat="server" AutoGenerateColumns="False"
GridLines="None" onrowdatabound="gvRevenue_RowDataBound" cellspacing="10">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("INDENT1") %>'></asp:Label>
</ItemTemplate>
<ItemStyle VerticalAlign="Top"/>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("INDENT2") %>'></asp:Label>
</ItemTemplate>
<ItemStyle VerticalAlign="Top"/>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("DESCRIPTION") %>'></asp:Label>
</ItemTemplate>
<ItemStyle VerticalAlign="Top" Height="20"/>
</asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("BOLD") %>'></asp:Label>
</ItemTemplate>
<ItemStyle VerticalAlign="Top" />
</asp:TemplateField>
<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Bind("AMOUNTDISPLAY") %>'></asp:Label>
</ItemTemplate>
<ItemStyle VerticalAlign="Top"/>
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("AMOUNT") %>'></asp:TextBox>
</ItemTemplate>
<ItemStyle VerticalAlign="Top"/>
</asp:TemplateField>
</Columns>
</asp:GridView>