hello, I have gridview with template fields(textbox,dropdown list,...) and I use required field validators for the textbox and dropdownlist where I make the validation on textchanged and dropselected index changed my problem is that the validation happend on all rows not just on the row where i change the text any idea?
validation is going to be fired for all dropdowns residing into other rows. how can i orevent this?
thanks
this the code:
<asp:GridView ID="uxCountSheetView" runat="server" AutoGenerateColumns="false" OnRowDataBound="uxCountSheetView_RowDataBound"
AllowPaging="true" PageSize="15" OnPageIndexChanging="uxCountSheetView_PageIndexChanging" ShowFooter="true">
<Columns>
<asp:TemplateField HeaderText="Item">
<ItemTemplate>
<asp:DropDownList ID="uxItems" runat="server" Width="100" CausesValidation="true" ValidationGroup="All" AutoPostBack="true" OnSelectedIndexChanged="uxItems_SelectedIndexChanged"></asp:DropDownList>
<asp:RequiredFieldValidator id="RequiredFieldValidator3"
ControlToValidate="uxItems" Display="Static" ValidationGroup="All" InitialValue="" Width="100%" runat="server">*</asp:RequiredFieldValidator> </ItemTemplate> </asp:TemplateField>
<asp:TemplateField HeaderText="AfterQuantity">
<ItemTemplate>
<asp:TextBox ID="uxAfterQuantity" ValidationGroup="All" CausesValidation="true" OnTextChanged="uxAfterQuantity_TextChanged" AutoPostBack="true" runat="server"></asp:TextBox>
<cc1:FilteredTextBoxExtender ID="uxFilterAfterQuantity" runat="server" FilterType="Custom, Numbers"
TargetControlID="uxAfterQuantity" ValidChars="."></cc1:FilteredTextBoxExtender>
<asp:RequiredFieldValidator runat="server" id="RequiredFieldValidator6"></asp:RequiredFieldValidator>
ControlToValidate="uxAfterQuantity"
Display="Static" ValidationGroup="All"
InitialValue="" Width="100%" runat="server"></ItemTemplate></asp:TemplateField><asp:TemplateField HeaderText="Difference"></Columns></asp:GridView>