Using Controls in SharePoint Application Pages

2 posts, 0 answers
  1. David
    David avatar
    8 posts
    Member since:
    Sep 2011

    Posted 10 Aug 2012 Link to this post

    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
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 10 Aug 2012 Link to this post

    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.
Back to Top