RadComboBox for ASP.NET

RadComboBox Send comments on this topic.
Items Property
See Also  Example
Telerik.WebControls Namespace > RadComboBox Class : Items Property


Gets the items of the RadComboBox.

  

 

Namespace: Telerik.WebControls
Assembly: RadComboBox (in RadComboBox.dll)

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Items As RadComboBoxItemCollection
Visual Basic (Usage)Copy Code
Dim instance As RadComboBox
Dim value As RadComboBoxItemCollection
 
value = instance.Items
C# 
public RadComboBoxItemCollection Items {get;}

Example

Visual BasicCopy Code
Dim item1 As New RadComboBoxItem("RadEditor")
RadComboBox1.Items.Add(item1)

Dim item2 As New RadComboBoxItem("RadTreeView")
RadComboBox1.Items.Add(item2)

Dim item3 As New RadComboBoxItem("RadSpell")
RadComboBox1.Items.Add(item3)

Dim item4 As New RadComboBoxItem("RadMenu")
RadComboBox1.Items.Add(item4)

Dim item5 As New RadComboBoxItem("RadTabStrip")
RadComboBox1.Items.Add(item5)
C#Copy Code
RadComboBoxItem item1 = new RadComboBoxItem("RadEditor");
RadComboBox1.Items.Add(item1);

RadComboBoxItem item2 =
new RadComboBoxItem("RadTreeView");
RadComboBox1.Items.Add(item2);            

RadComboBoxItem item3 =
new RadComboBoxItem("RadSpell");
RadComboBox1.Items.Add(item3);                        

RadComboBoxItem item4 =
new RadComboBoxItem("RadMenu");
RadComboBox1.Items.Add(item4);            

RadComboBoxItem item5 =
new RadComboBoxItem("RadTabStrip");
RadComboBox1.Items.Add(item5);
    

Remarks

This property enables you to obtain a reference to the list of items currently stored in the RadComboBox. With this reference, you can add items, remove items, and obtain a count of the items in the collection. For more information about the tasks that can be performed with the item collection, see the RadComboBoxItemCollection class reference topics.

You can also manipulate the items of a RadComboBox by using the DataSource property. If you use the DataSource property to add items to a RadComboBox, you can view the items using the Items property but you cannot add or remove items from the list with the methods from theRadComboBoxItemCollection.

See Also