JQuery dialog using load(). After closing the Telerik controls cannot postback.

3 posts, 0 answers
  1. Georgia
    Georgia avatar
    6 posts
    Member since:
    Nov 2015

    Posted 01 Nov 2015 Link to this post

    Hello,

    I have a parent page and I open a jQuery Dialog using the load function in order to open another aspx page. Everything looks fine when the dialogs opens, however, when I close the dialog ​my Telerik Controls (tried RadComboBox, RadButton, RadGrid) cannot postback, asp:buttons work properly.

    Please note that both of my pages are enclosed by update panels but I have removed them and I still have the same behavior. Also, I have another jQuery dialog within the same page but without the load functionality (just displays a div) and does not causes the same issue. 

    My Page is very large and may be something else causes the issue but I have tried to isolate some parts of my code that I believe that are important.

     <script type="text/javascript">

        $(document).ready(
            //Bind jQuery events
            function () {
                Load();     
        });
        
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_endRequest(
            // re-bind jQuery events on End Request
            function () {
                Load();
        });
        
        function Load() {
            $(".companyLink").click( //On a link  click event
            function () {
                $(".client-editor")
                    .load("../somepage.aspx?cid=ad24a5dd-e2bb-4196-9f06-6fac43ccd4c0")  //Load the aspx page
                    .dialog({            //Prepare the dialog
                        autoOpen: false,
                        modal: true,
                        close: function () {   //Empty the page loaded on close
                            $(".client-editor").empty();
                            }
                        });
                $(".client-editor").dialog("open"); //Open the dialog
            });
        }
    </script>



    <asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server" ChildrenAsTriggers="true">
        <ContentTemplate>
            <asp:HyperLink id="hlkCompanyName" runat="server" CssClass="companyLink" Text="Open"></asp:HyperLink>
            <telerik:RadButton ID="rbButton1" runat="server" Text="Telerik Button"></telerik:RadButton>
            <asp:Button ID="btnButton2" runat="server" Text="ASP Button" />
            <div class="client-editor" title="Edit Control"></div>
        </ContentTemplate>
    </asp:UpdatePanel>
          








  2. Georgia
    Georgia avatar
    6 posts
    Member since:
    Nov 2015

    Posted 01 Nov 2015 Link to this post

    I have isolated the code above in another web page and it works with the button, for some reason on my page it causes some hidden validators to stop the postback.

     

    I still have an issue with the RadComboBox though. On the above code if I add the following, the drop down of the RadComboBox does not open after the dialog closes.

     

      <telerik:RadComboBox ID="​rcbOptions" runat="server">
            <Items>
                <telerik:RadComboBoxItem Text="option 1" Value="0" />
                <telerik:RadComboBoxItem Text="option 2" Value="1" />
                <telerik:RadComboBoxItem Text="option 2" Value="3" />
            </Items>
        </telerik:RadComboBox>

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Georgia
    Georgia avatar
    6 posts
    Member since:
    Nov 2015

    Posted 08 Nov 2015 Link to this post

    Hello,

    Still waiting an answer for this! After jQuery dialog with load() RadCombox is not opening.

Back to Top