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

Using Controls in SharePoint Application Pages

1 Answer 28 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 10 Aug 2012, 10:31 AM
Hi,

I might be missing a trick here but I simply want to get a reference to a RadComboBox which is sitting on a SharePoint application page.

If my RadComboBox has an ID of lstCountry then I can select it (?) using;

var brandDropDown = $("select[id$='lstCountry']");

However none of the methods I'd expect to see are present, so the following attempt at adding items doesn't work (method not supported)

   var comboItem = new Telerik.Web.UI.RadComboBoxItem();
   comboItem.set_text(unit.Brand.Name);
   brandDropDown.Items.Add(comboItem); OR
   brandDropDown.get_items().add(comboItem)

I'm pretty sure the JQuery selector is not getting the correct object from the DOM - can anyone help me out please ?

Thanks,

MDM

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 10 Aug 2012, 02:22 PM
Hi David,

In general you should be able to obtain RadComboBox client-side instance in this way:
var combo = $find("<%= lstCountry.ClientID %>");

If the issue persists – could you please explain your scenario in more details and paste here some working code?

All the best,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or