This is a migrated thread and some comments may be shown as answers.

Validation in Usercontrol using RadAjaxManager

5 Answers 165 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Pradeep Enugala
Top achievements
Rank 1
Pradeep Enugala asked on 18 May 2010, 11:33 AM
Hi,
   I am using RadTabStrip and in that I have multiple tabs. I am also using RadAjaxManager.
   In one of the tabs I have a grid which is enclosed in RadAjaxPanel.   On clicking the Add link of the grid a user control pops-up and will insert a record successfully.

   The problem I am facing currently is with the validations
    Currently I am enclosing the ValidationSummary in a DIV and the DIV is hidden by default,
    OnClientClick event is fired when User clicks on Add button to check if there are any validations errors and if yes gets the innerHTML of the div and displays it using radalert.
    But my Page_ClientValidate("vgVendor") always returns true and I also observed that on clicking the Add button first time the Div.innerHTML does not have the error message but 2nd time it has the error message in it. Page_ClientValidate("vgVendor") always returns true.

Can you please help me on this.

Thanks in advance
Pradeep.

5 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 19 May 2010, 12:03 PM
Hello Pradeep,

Could you please specify if the validators, the validated controls and the validation summary are wrapped in the RadAjaxPanel as well as the grid?
If you could send us a runnable code, we will debug it locally and turn back to you with our findings.

Greetings,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Pradeep Enugala
Top achievements
Rank 1
answered on 20 May 2010, 04:47 AM
Hi Lana,
    I have the controls in the following order
   <telerik:RadPageView ID="rpv_Vendor" runat="server" Width="100%">
            <telerik:RadAjaxPanel ID="pnlVendor" runat="server" LoadingPanelID="LoadingPanel1">
                       <telerik:RadGrid ID="gv_Vendor" runat="server" AutoGenerateColumns="False" AllowPaging="True" ...>
                               <EditFormSettings EditFormType="WebUserControl" FormStyle-Width="1000" CaptionDataField="VendorName"   
                                      CaptionFormatString="Update {0}"  InsertCaption="Add Vendor"
                                             UserControlName="../Controls/Vendors.ascx">
                                               <EditColumn UniqueName="EditCommandColumn1">
                                               </EditColumn>
                                               <PopUpSettings Modal="True" Width="520px" ZIndex="5000" Height="257px" />
                                </EditFormSettings>
                       </telerik:RadGrid>

    In the Vendors.ascx I have a table with RadCombobox controls   requiredfieldvalidators and an asp button. I am calling javascript function in OnClientClick event of the asp button.

Thank you very much.
Pradeep.
0
Iana Tsolova
Telerik team
answered on 20 May 2010, 02:36 PM
Hi Pradeep,

Is the ValidationSummary in the Vendor.ascx user controls as well?

Looking forward your reply,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Pradeep Enugala
Top achievements
Rank 1
answered on 21 May 2010, 04:38 AM
Hi lana,
    ASP button, RequiredFieldValidators and ValidationSummary are in Vendor.ascx UserControl only.

Thanks,
Pradeep.
0
Iana Tsolova
Telerik team
answered on 26 May 2010, 11:34 AM
Hello Pradeep,

Could you please try the attached sample and let me know if it works as expected and what differs in your case?

Sincerely yours,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Pradeep Enugala
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Pradeep Enugala
Top achievements
Rank 1
Share this question
or