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

RadCombobox does not open after JQuery dialog loads another page.

0 Answers 47 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Georgia
Top achievements
Rank 1
Georgia asked on 20 Nov 2015, 03:44 PM

Hello,

I would appreciate some help here.

I have the following code, which includes a RadComboBox, a hyperlink and an empty div element. On the hyperlink click event I load another apsx page in a jQuery dialog. After closing the dialog, I try to open the RadComboBox but it doesn't open and it gives the below JavaScript error:

 

Error: Sys.ArgumentTypeException: Object of type 'Telerik.Web.UI.RadComboBoxCancelEventArgs' cannot be converted to type 'Sys.CancelEventArgs'. Parameter name: instance

01.    <script type="text/javascript">
02. 
03.        $(document).ready(
04.            //Bind jQuery events
05.            function () {
06.                Load();
07.             
08. 
09.            var prm = Sys.WebForms.PageRequestManager.getInstance();
10.            if (prm) {
11.                prm.add_endRequest(
12.                    // re-bind jQuery events on End Request
13.                    function () {
14.                        Load();
15.                    });
16.            }});
17.        function Load() {
18.            $(".companyLink").click( //On a link  click event
19.            function () {
20.                $(".client-editor")
21.                    .load("../somepage.aspx"//Load the aspx page
22.                    .dialog({           //Prepare the dialog
23.                        autoOpen: false,
24.                        modal: true,
25.                        close: function () {   //Empty the page loaded on close
26.                            $(".client-editor").empty();
27.                        }
28.                    });
29.                $(".client-editor").dialog("open"); //Open the dialog
30.            });
31.        }
32.</script>

 

01.<asp:HyperLink id="HyperLink1" runat="server" CssClass="companyLink" Text="CLick Here" ></asp:HyperLink>
02. 
03.     <telerik:RadComboBox ID="ddlInvoiceStatus" runat="server" RegisterWithScriptManager="false">
04.        <Items>
05.            <telerik:RadComboBoxItem Text="option 1" Value="0" />
06.            <telerik:RadComboBoxItem Text="option 2" Value="1" />
07.            <telerik:RadComboBoxItem Text="option 2" Value="3" />
08.        </Items>
09.    </telerik:RadComboBox>
10.   
11.  
12.<div class="client-editor" title="Edit Client Details"></div>

No answers yet. Maybe you can help?

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