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

Adding an Item with checkbox to RadComboBox

5 Answers 207 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ravi Shankar
Top achievements
Rank 1
Ravi Shankar asked on 30 Jul 2010, 04:12 PM
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

5 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 02 Aug 2010, 03:04 PM
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
0
Mark
Top achievements
Rank 1
answered on 19 Jan 2011, 10:37 PM
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?
0
Kalina
Telerik team
answered on 25 Jan 2011, 12:27 PM
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.
0
Roberto
Top achievements
Rank 1
answered on 29 Oct 2015, 11:26 PM

How can i add checkbox to radcombox usng programming

 

0
Eyup
Telerik team
answered on 03 Nov 2015, 07:47 AM
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
Tags
ComboBox
Asked by
Ravi Shankar
Top achievements
Rank 1
Answers by
Simon
Telerik team
Mark
Top achievements
Rank 1
Kalina
Telerik team
Roberto
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or