Adding an Item with checkbox to RadComboBox

6 posts, 0 answers
  1. Ravi Shankar
    Ravi  Shankar avatar
    12 posts
    Member since:
    Mar 2010

    Posted 30 Jul 2010 Link to this post

    Hi,
       How to add an item with an checkbox to RadComboBox using javascript(client side).
    Please let me know if you need more details.

    Any suggestions pls
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 02 Aug 2010 Link to this post

    Hi Ravi Shankar,

    You can create and add Items with the client-side API of RadComboBox and its helper objects as shown in this article.

    After you create the Item you can get its DOM element by calling item.get_element() and add the CheckBox in it.

    Sincerely yours,
    Simon
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Mark
    Mark avatar
    5 posts
    Member since:
    Dec 2008

    Posted 19 Jan 2011 Link to this post

    I too would like to do this, but I am unclear on how to do this.  What is the API for adding a child control to the ComboBoxItem?
  5. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 25 Jan 2011 Link to this post

    Hello Mark,

    You can try handling the OnClientLoad event of the RadComboBox and add the checkbox at client-side in this way:
    <script type="text/javascript">
    function OnClientLoad(sender)
    {
        items = sender.get_items();
         
        for (i=0; i< items.get_count(); i++)
        {
            var item = items.getItem(i).get_element();
          
            var cb = document.createElement( "input" );
            cb.type = "checkbox";
            cb.id = "id"+i;
            cb.value = items.getItem(i).get_value();
            cb.checked = false;
            item.appendChild(cb);
        }
    }
    </script>


    All the best,
    Kalina
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  6. Roberto
    Roberto avatar
    1 posts
    Member since:
    Mar 2012

    Posted 29 Oct 2015 in reply to Ravi Shankar Link to this post

    How can i add checkbox to radcombox usng programming

     

  7. Eyup
    Admin
    Eyup avatar
    3005 posts

    Posted 03 Nov 2015 Link to this post

    Hello Roberto,

    RadComboBox provides the CheckBoxes property. You can check a live sample here:
    http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/checkboxes/defaultvb.aspx?show-source=true

    Hope this helps.

    Regards,
    Eyup
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017