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

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

2 Answers 89 Views
Window
This is a migrated thread and some comments may be shown as answers.
Georgia
Top achievements
Rank 1
Georgia asked on 01 Nov 2015, 04:13 PM

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 Answers, 1 is accepted

Sort by
0
Georgia
Top achievements
Rank 1
answered on 01 Nov 2015, 06:48 PM

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>

0
Georgia
Top achievements
Rank 1
answered on 08 Nov 2015, 02:02 PM

Hello,

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

Tags
Window
Asked by
Georgia
Top achievements
Rank 1
Answers by
Georgia
Top achievements
Rank 1
Share this question
or