Edit this page

Design time

This article demonstrates how to populate RadDropDownList with data at design time. The RadListDataItem Collection Editor allows you to do that.

Figure 1: RadListDataItem Collection Editor

dropdown-and-listcontrol-dropdownlist-populating-with-data-design-time 001

You can access it through the Smart tag >> Edit Items option:

Figure 2: Smart tag options

dropdown-and-listcontrol-dropdownlist-populating-with-data-design-time 002

Another possibility to open the editor is via the Items collection in the Properties Visual Studio section:

Figure 3: Visual Studio Properties window

dropdown-and-listcontrol-dropdownlist-populating-with-data-design-time 003

You can add two item types:

  • RadListDataItem – it represents a logical data item which can display specific text and image.You can customize its look through the Properties section on the right side of the item in the RadListDataItem Collection Editor.

Figure 4: Sample RadListDataItem

dropdown-and-listcontrol-dropdownlist-populating-with-data-design-time 004

Below you can find the properties associated with the RadListDataItem:

Figure 5: RadListDataItem's properties

dropdown-and-listcontrol-dropdownlist-populating-with-data-design-time 005

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

Figure 6: Sample DescriptionTextListDataItem

dropdown-and-listcontrol-dropdownlist-populating-with-data-design-time 006

You have two additional properties: DescriptionFont and DescriptionText which specifies the font and the text associated with the item’s description.

Figure 7: DescriptionTextListDataItem's properties

dropdown-and-listcontrol-dropdownlist-populating-with-data-design-time 007

See Also