Hi,
I have three table in my page. first table have radbutton for save with radtextbox using required field validator. first time error message displayed. i am using ajax loading panel for the particular table. first time record saved successfully with loading panel. but second time required field validator not firing. click event firing with empty radtextbox.
How to fix this problem. i have attached code. please check and let me know.
<telerik:AjaxSetting AjaxControlID="rbSave">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="tblAttachFiles" LoadingPanelID="ralpAttachment" />
</UpdatedControls>
</telerik:AjaxSetting>
<asp:Table ID="tblSaveAttachment" runat="server" border="2" Style="font-family: Segoe UI;
font-size: 12px; font-weight: bold" Width="600px">
<asp:TableRow>
<asp:TableCell ID="tblAttachSaveFirst" Width="100px" runat="server" Text="FileName: "></asp:TableCell>
<asp:TableCell>
<asp:Label ID="lblFileName" runat="server"></asp:Label>
<asp:HiddenField ID="hfFileName" runat="server" />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell ID="tcSSN_GrpNum_Tin" runat="server" Text="SSN: "></asp:TableCell>
<asp:TableCell>
<asp:HiddenField ID="hf_Pty_payinfo_id" runat="server" />
<telerik:RadTextBox ID="txtSSN_GrpNum_Tin" runat="server" onblur="ssn_onBlur()" Width="191px">
</telerik:RadTextBox>
<asp:Label ID="lblSSN_GrpNum_Tin" runat="server" style="display:none;visibility:hidden"></asp:Label>
<asp:Label ID="lblMantxtSSN_GrpNum_Tin" runat="server" Text=" * "
ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvtxtSSN_GrpNum_Tin" runat="server" ControlToValidate="txtSSN_GrpNum_Tin"
Display="Static" ForeColor="Red" Font-Bold="false" ValidationGroup="Validate"
Text="Please enter SSN"></asp:RequiredFieldValidator>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell ID="tcCliam_Group_SSN_Provider_Name" runat="server" Text="Name:">
<%--<asp:Label ID="lblCliam_Group_SSN_Provider_Name" runat="server" Text="Name:"></asp:Label>--%>
</asp:TableCell><asp:TableCell>
<telerik:RadComboBox ID="rcbCliam_Group_SSN_Provider_Name" runat="server" Width="195px"
AutoPostBack="false" OnClientSelectedIndexChanged="rcbCliam_Group_SSN_Provider_Name_OnClientSelectedIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="" Value="" />
</Items>
</telerik:RadComboBox>
<label id="lblCliam_Group_SSN_Provider_Name" runat="server" style="display:none;visibility:hidden"></label>
<asp:Label ID="lblManCliam_Group_SSN_Provider_Name" runat="server" Text=" * " ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvCliam_Group_SSN_Provider_Name" runat="server"
ControlToValidate="rcbCliam_Group_SSN_Provider_Name" Display="Static" ForeColor="Red"
Font-Bold="false" InitialValue="" ValidationGroup="Validate" Text="Please select Name"></asp:RequiredFieldValidator>
</asp:TableCell></asp:TableRow>
<asp:TableRow>
<asp:TableCell ID="tclDocType" runat="server" Text="Document Type:">
<%-- <asp:Label ID="lblDocType" runat="server" Text="Document Type:"></asp:Label>--%>
</asp:TableCell><asp:TableCell>
<telerik:RadComboBox ID="rcbDocType" runat="server" Width="195px">
<Items>
<telerik:RadComboBoxItem Text="" Value="" />
</Items>
</telerik:RadComboBox>
<label id="lblDocType" runat="server" style="display:none;visibility:hidden"></label>
<asp:Label ID="lblManDocType" runat="server" Text=" * " ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvDocType" runat="server" ControlToValidate="rcbDocType"
Display="Static" ForeColor="Red" Font-Bold="false" InitialValue=""
ValidationGroup="Validate" Text="Please select Document Type"></asp:RequiredFieldValidator>
</asp:TableCell></asp:TableRow>
<asp:TableRow ID="trCliamId" runat="server">
<asp:TableCell ID="tcCliamId" runat="server" Text="Cliam Id:">
<%--<asp:Label ID="lblCliamId_PlanTypes" runat="server" Text="Cliam Id:"></asp:Label>--%>
</asp:TableCell><asp:TableCell>
<telerik:RadTextBox ID="txtCliamId" runat="server" onblur="CliamId_onBlur()" Width="191px">
</telerik:RadTextBox>
<asp:Label ID="lblCliamId" runat="server" style="display:none;visibility:hidden"></asp:Label>
<asp:Label ID="lblManCliamId" runat="server" Text=" * " ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvCliamId" runat="server" ControlToValidate="txtCliamId"
Enabled="false" Display="Static" ForeColor="Red" Font-Bold="false" ValidationGroup="Validate"
Text="Please enter Cliam Id"></asp:RequiredFieldValidator>
</asp:TableCell></asp:TableRow>
<asp:TableRow ID="trPlanType" runat="server">
<asp:TableCell ID="tcPlanType" runat="server" Text="Plan Type:">
<%--<asp:Label ID="lblCliamId_PlanTypes" runat="server" Text="Cliam Id:"></asp:Label>--%>
</asp:TableCell><asp:TableCell>
<telerik:RadComboBox ID="rcPlanType" runat="server" Width="195px">
<Items>
<telerik:RadComboBoxItem Text="" Value="" />
</Items>
</telerik:RadComboBox>
<asp:Label ID="lblPlanType" runat="server" style="display:none;visibility:hidden"></asp:Label>
<asp:Label ID="lblManPlanType" runat="server" Text=" * " ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvPlanType" runat="server" ControlToValidate="rcPlanType"
Display="Static" ForeColor="Red" Font-Bold="false" InitialValue="" ValidationGroup="Validate"
Text="Please Select Plan Type"></asp:RequiredFieldValidator>
</asp:TableCell></asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="lblDesc" runat="server" Text="Discription:"></asp:Label>
</asp:TableCell><asp:TableCell>
<telerik:RadTextBox ID="txt_Discription" runat="server" Width="250px" ClientEvents-OnKeyPress="txtSaveBtn_OnKeyPress">
</telerik:RadTextBox>
<asp:Label ID="lblDiscription" runat="server" style="display:none;visibility:hidden"></asp:Label>
<asp:Label ID="lblManDesc" runat="server" Text=" * " ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvDescrip" runat="server" ControlToValidate="txt_Discription"
Display="Static" ForeColor="Red" Font-Bold="false" ValidationGroup="Validate"
Text="Please enter Description"></asp:RequiredFieldValidator>
</asp:TableCell></asp:TableRow>
<asp:TableRow ID="trBtn" runat="server">
<asp:TableCell ColumnSpan="2" HorizontalAlign="Center">
<telerik:RadButton ID="rbSave" runat="server" Text="Save" Width="75px" OnClientClicked="rbSave_OnClientClicked"
ValidationGroup="Validate" CausesValidation="false" UseSubmitBehavior="false">
</telerik:RadButton>
<telerik:RadButton ID="rbCancel" runat="server" Text="Cancel" Width="75px" OnClientClicked="rbCancel_OnClientClicked">
</telerik:RadButton>
</asp:TableCell></asp:TableRow>
</asp:Table>
Thanks,
Dhamu
I have three table in my page. first table have radbutton for save with radtextbox using required field validator. first time error message displayed. i am using ajax loading panel for the particular table. first time record saved successfully with loading panel. but second time required field validator not firing. click event firing with empty radtextbox.
How to fix this problem. i have attached code. please check and let me know.
<telerik:AjaxSetting AjaxControlID="rbSave">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="tblAttachFiles" LoadingPanelID="ralpAttachment" />
</UpdatedControls>
</telerik:AjaxSetting>
<asp:Table ID="tblSaveAttachment" runat="server" border="2" Style="font-family: Segoe UI;
font-size: 12px; font-weight: bold" Width="600px">
<asp:TableRow>
<asp:TableCell ID="tblAttachSaveFirst" Width="100px" runat="server" Text="FileName: "></asp:TableCell>
<asp:TableCell>
<asp:Label ID="lblFileName" runat="server"></asp:Label>
<asp:HiddenField ID="hfFileName" runat="server" />
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell ID="tcSSN_GrpNum_Tin" runat="server" Text="SSN: "></asp:TableCell>
<asp:TableCell>
<asp:HiddenField ID="hf_Pty_payinfo_id" runat="server" />
<telerik:RadTextBox ID="txtSSN_GrpNum_Tin" runat="server" onblur="ssn_onBlur()" Width="191px">
</telerik:RadTextBox>
<asp:Label ID="lblSSN_GrpNum_Tin" runat="server" style="display:none;visibility:hidden"></asp:Label>
<asp:Label ID="lblMantxtSSN_GrpNum_Tin" runat="server" Text=" * "
ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvtxtSSN_GrpNum_Tin" runat="server" ControlToValidate="txtSSN_GrpNum_Tin"
Display="Static" ForeColor="Red" Font-Bold="false" ValidationGroup="Validate"
Text="Please enter SSN"></asp:RequiredFieldValidator>
</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell ID="tcCliam_Group_SSN_Provider_Name" runat="server" Text="Name:">
<%--<asp:Label ID="lblCliam_Group_SSN_Provider_Name" runat="server" Text="Name:"></asp:Label>--%>
</asp:TableCell><asp:TableCell>
<telerik:RadComboBox ID="rcbCliam_Group_SSN_Provider_Name" runat="server" Width="195px"
AutoPostBack="false" OnClientSelectedIndexChanged="rcbCliam_Group_SSN_Provider_Name_OnClientSelectedIndexChanged">
<Items>
<telerik:RadComboBoxItem Text="" Value="" />
</Items>
</telerik:RadComboBox>
<label id="lblCliam_Group_SSN_Provider_Name" runat="server" style="display:none;visibility:hidden"></label>
<asp:Label ID="lblManCliam_Group_SSN_Provider_Name" runat="server" Text=" * " ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvCliam_Group_SSN_Provider_Name" runat="server"
ControlToValidate="rcbCliam_Group_SSN_Provider_Name" Display="Static" ForeColor="Red"
Font-Bold="false" InitialValue="" ValidationGroup="Validate" Text="Please select Name"></asp:RequiredFieldValidator>
</asp:TableCell></asp:TableRow>
<asp:TableRow>
<asp:TableCell ID="tclDocType" runat="server" Text="Document Type:">
<%-- <asp:Label ID="lblDocType" runat="server" Text="Document Type:"></asp:Label>--%>
</asp:TableCell><asp:TableCell>
<telerik:RadComboBox ID="rcbDocType" runat="server" Width="195px">
<Items>
<telerik:RadComboBoxItem Text="" Value="" />
</Items>
</telerik:RadComboBox>
<label id="lblDocType" runat="server" style="display:none;visibility:hidden"></label>
<asp:Label ID="lblManDocType" runat="server" Text=" * " ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvDocType" runat="server" ControlToValidate="rcbDocType"
Display="Static" ForeColor="Red" Font-Bold="false" InitialValue=""
ValidationGroup="Validate" Text="Please select Document Type"></asp:RequiredFieldValidator>
</asp:TableCell></asp:TableRow>
<asp:TableRow ID="trCliamId" runat="server">
<asp:TableCell ID="tcCliamId" runat="server" Text="Cliam Id:">
<%--<asp:Label ID="lblCliamId_PlanTypes" runat="server" Text="Cliam Id:"></asp:Label>--%>
</asp:TableCell><asp:TableCell>
<telerik:RadTextBox ID="txtCliamId" runat="server" onblur="CliamId_onBlur()" Width="191px">
</telerik:RadTextBox>
<asp:Label ID="lblCliamId" runat="server" style="display:none;visibility:hidden"></asp:Label>
<asp:Label ID="lblManCliamId" runat="server" Text=" * " ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvCliamId" runat="server" ControlToValidate="txtCliamId"
Enabled="false" Display="Static" ForeColor="Red" Font-Bold="false" ValidationGroup="Validate"
Text="Please enter Cliam Id"></asp:RequiredFieldValidator>
</asp:TableCell></asp:TableRow>
<asp:TableRow ID="trPlanType" runat="server">
<asp:TableCell ID="tcPlanType" runat="server" Text="Plan Type:">
<%--<asp:Label ID="lblCliamId_PlanTypes" runat="server" Text="Cliam Id:"></asp:Label>--%>
</asp:TableCell><asp:TableCell>
<telerik:RadComboBox ID="rcPlanType" runat="server" Width="195px">
<Items>
<telerik:RadComboBoxItem Text="" Value="" />
</Items>
</telerik:RadComboBox>
<asp:Label ID="lblPlanType" runat="server" style="display:none;visibility:hidden"></asp:Label>
<asp:Label ID="lblManPlanType" runat="server" Text=" * " ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvPlanType" runat="server" ControlToValidate="rcPlanType"
Display="Static" ForeColor="Red" Font-Bold="false" InitialValue="" ValidationGroup="Validate"
Text="Please Select Plan Type"></asp:RequiredFieldValidator>
</asp:TableCell></asp:TableRow>
<asp:TableRow>
<asp:TableCell>
<asp:Label ID="lblDesc" runat="server" Text="Discription:"></asp:Label>
</asp:TableCell><asp:TableCell>
<telerik:RadTextBox ID="txt_Discription" runat="server" Width="250px" ClientEvents-OnKeyPress="txtSaveBtn_OnKeyPress">
</telerik:RadTextBox>
<asp:Label ID="lblDiscription" runat="server" style="display:none;visibility:hidden"></asp:Label>
<asp:Label ID="lblManDesc" runat="server" Text=" * " ForeColor="Red"></asp:Label>
<asp:RequiredFieldValidator ID="rfvDescrip" runat="server" ControlToValidate="txt_Discription"
Display="Static" ForeColor="Red" Font-Bold="false" ValidationGroup="Validate"
Text="Please enter Description"></asp:RequiredFieldValidator>
</asp:TableCell></asp:TableRow>
<asp:TableRow ID="trBtn" runat="server">
<asp:TableCell ColumnSpan="2" HorizontalAlign="Center">
<telerik:RadButton ID="rbSave" runat="server" Text="Save" Width="75px" OnClientClicked="rbSave_OnClientClicked"
ValidationGroup="Validate" CausesValidation="false" UseSubmitBehavior="false">
</telerik:RadButton>
<telerik:RadButton ID="rbCancel" runat="server" Text="Cancel" Width="75px" OnClientClicked="rbCancel_OnClientClicked">
</telerik:RadButton>
</asp:TableCell></asp:TableRow>
</asp:Table>
Thanks,
Dhamu