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

RadComboBox - convert jQuery to telerik client object

1 Answer 31 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Rama
Top achievements
Rank 1
Rama asked on 08 Dec 2016, 08:01 PM

Hi

I have a RadPane which loads an aspx page that contains a RadComboBox.

A Javascript function on the parent page is trying to find the element - 

$('#RAD_SPLITTER_PANE_CONTENT_MyRadPane').contents().contents().find("#" + cbo.id)

However, this returns just a jQuery object which is not useful when I want to manipulate the items using get_items() etc.

How can I get the Telerik client object in this scenario?

Thanks in advance.

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 12 Dec 2016, 08:28 AM
Hello Rama,

If you have set your RadPane's ContentUrl property the aspx page will be loaded in an iframe. You can get the RadComboBox object through that iframe as shown below:
var id = "RadComboBox1";
 
var iframe = document.getElementById("RAD_SPLITTER_PANE_EXT_CONTENT_MyRadPane");
var combo = document.getElementById("RAD_SPLITTER_PANE_EXT_CONTENT_MyRadPane").contentWindow.$find(id);

id is hard-coded to "RadComboBox1" in the code snippet. If in your scenario you are saving the id in cbo.id you should use it instead: .$find(cbo.id)

Regards,
Ivan Danchev
Telerik by Progress
Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
Tags
ComboBox
Asked by
Rama
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or