New to Telerik UI for WinForms? Download free 30-day trial

Adding items programmatically

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

RadCheckedListDataItem dataItem = new RadCheckedListDataItem();
dataItem.Text = "Chicken toast";

DescriptionTextCheckedListDataItem descriptionItem = new DescriptionTextCheckedListDataItem();
descriptionItem.Text = "Chicken wings";
descriptionItem.Checked = true;
descriptionItem.DescriptionText = "some description";

Dim dataItem As New RadCheckedListDataItem()
dataItem.Text = "Chicken toast"
Dim descriptionItem As New DescriptionTextCheckedListDataItem()
descriptionItem.Text = "Chicken wings"
descriptionItem.Checked = True
descriptionItem.DescriptionText = "some description"

See Also

In this article