New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Declaring the Items Inline

The definition of RadListBox items can be added to the in-line declaration of the ListBox using the RadListBox Item Builder. The item builder updates the ASPX or ASCX file to include the list of items and their properties.

You can also directly edit the ASPX or ASCX file by adding items to the section of the RadListBox declaration. Every item definition must be enclosed in <telerik:RadListBoxItem> and </telerik:RadListBoxItem> tags.

Example

Add the following inline definition of RadListBox to your ASPX or ASCX file:

ASPNET
<telerik:RadListBox RenderMode="Lightweight" ID="RadListBox2"
   runat="server"
   Skin="Vista">
   <Items>
	   <telerik:RadListBoxItem Text="RadMenu" />
	   <telerik:RadListBoxItem Text="RadComboBox" />
	   <telerik:RadListBoxItem Text="RadListBox" Selected="true" />
   </Items>
</telerik:RadListBox> 

At run-time the result will be:

Inline itemes

See Also

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