i have gridview and and the columns were coming from datatable
can i give validator for gridview for editing for some columns i only want to enter numbers only is there any way to do this
View Complete Post
Hi, I want to have TextBox validators like in this case: http://msdn.microsoft.com/en-us/library/ms972948.gridview_fig45l(l=en-us).gif
I transfer the code to my necessities but the error message, displayed at the textbox, is the same as in the summary.
In the msdn - example there is only a asterisk at the respective textbox where the validation fails and the full error message is displayed in the summary.
How can I handle this? It seems to me that the validation summary only repeat the single error messages of the validators. When I set the single validators vissibility to "hidden"(which I would also use, because I thought they are still displayed in the validation summary -_- ), they are not displayed in the summary too.
I am trying to use a compare validator in the EditItemTemplate for the Gridview.
I would like to set the Maximum value for the validator at runtime e.g. Page_Load
Is there a way to set the Maximum value for a "Template field" dynamically at load time
Snippet of code:
<asp:TemplateField HeaderText="Birth Year" SortExpression="MemberBirthYear"> <EditItemTemplate> <asp:TextBox ID="eitMemberBirthYear" runat="server" CssClass="eitField" Text='<%# Bind("MemberBirthYear") %>' Width="60px"></asp:TextBox> <asp:RequiredFieldValidator ID="Re