Hi,
I want a Gridview which contains a textbox to edit and with a Validate control which will validate the text box value. But when I put the two controls under <itemtemplate> tag I can see the textbox but if I put the same under <edititemtemplate> tag I can't see the textbox.
Here is my code...
<asp:TemplateField HeaderText="Sort Order" SortExpression="Sort_Order" meta:resourcekey="APPROVAL_STATUSResource">
<itemstyle width="10%" horizontalalign="right"></itemstyle>
<headerstyle width="10%" horizontalalign="right" ></headerstyle>
<EditItemTemplate>
<asp:TextBox runat="server" Text='<%#Bind("Sort_Order") %>' ID="txtSortOrder" ></asp:TextBox>
<asp:CompareValidator ControlToValidate="txtSortOrder" Operator="GreaterThanEqual" Type="Integer" ValueToCompare="0" ErrorMessage="The Sort Order Field cannot be negative." Display="None" runat="server" />
</EditItemTemplate>
</asp:TemplateField>