New to Telerik UI for WinFormsStart a free 30-day trial

Adding items programmatically

Updated over 6 months ago

RadCheckedDropDownList supports adding items at run time, which means that you can manually populate it with data. The following example demonstrates how to add two different items to the RadCheckedDropDownList.Items collection.

You can use one of the following item types:

  • RadCheckedListDataItem – it represents a logical data item which can display specific text, image and checkbox.

  • DescriptionTextCheckedListDataItem – similar to the RadCheckedListDataItem. In addition, it displays some description below the item’s text.

Figure 1: Sample RadCheckedListDataItem and DescriptionTextCheckedListDataItem

WinForms RadCheckedDropDownList Sample RadCheckedListDataItem and DescriptionTextCheckedListDataItem

Add items programmatically

C#
RadCheckedListDataItem dataItem = new RadCheckedListDataItem();
dataItem.Text = "Chicken toast";
radCheckedDropDownList1.Items.Add(dataItem);
            
DescriptionTextCheckedListDataItem descriptionItem = new DescriptionTextCheckedListDataItem();
descriptionItem.Text = "Chicken wings";
descriptionItem.Checked = true;
descriptionItem.DescriptionText = "some description";
radCheckedDropDownList1.Items.Add(descriptionItem);

See Also

In this article
See Also
Not finding the help you need?
Contact Support