Validation in Usercontrol using RadAjaxManager

6 posts, 0 answers
  1. Pradeep Enugala
    Pradeep Enugala avatar
    55 posts
    Member since:
    Apr 2010

    Posted 18 May 2010 Link to this post

    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.
  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 19 May 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pradeep Enugala
    Pradeep Enugala avatar
    55 posts
    Member since:
    Apr 2010

    Posted 19 May 2010 Link to this post

    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.
  5. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 20 May 2010 Link to this post

    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.
  6. Pradeep Enugala
    Pradeep Enugala avatar
    55 posts
    Member since:
    Apr 2010

    Posted 20 May 2010 Link to this post

    Hi lana,
        ASP button, RequiredFieldValidators and ValidationSummary are in Vendor.ascx UserControl only.

    Thanks,
    Pradeep.
  7. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 26 May 2010 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017