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

Getting Started with WinForms ListControl

Getting Started with RadListControl
In this video, you will learn how to bind data to the new RadListControl.
WinForms RadListControl Getting Started Tutorial

This tutorial demonstrates how to manually populate RadListControl and how to react to a user's choice in code.

1. Place a RadListControl and a RadLabel control on a form.

2. Select the RadListControl control, open its Smart Tag menu.

3. Select the Edit Items task.

4. In the RadItem Collection Editor, click Add.

5. Set the Text property of the new ListItem to "RadComboBox".

Figure 1: RadListDataItem Collection Editor

WinForms RadListControl RadListDataItem Collection Editor

6. Add five more ListItems to the RadListControl. Set their Text properties to "RadDock", "RadMenu", "RadRibbonBar", "RadGridView", and "RadPageView".

7. Click OK.

8. In the Properties window, click the events button.

9. Double-click the SelectedIndexChanged event.

10. Replace the automatically-generated event handler with this code:

Handling the SelectedIndexChanged event

void radListControl1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
    RadListDataItem item = this.radListControl1.SelectedItem as RadListDataItem;
    radLabel1.Text = "Selected control: " + item.Text;

Private Sub radListControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.Data.PositionChangedEventArgs)
    Dim item As RadListDataItem = TryCast(Me.radListControl1.SelectedItem, RadListDataItem)
    radLabel1.Text = "Selected control: " & item.Text
End Sub

11. Press F5 to run the project. Select an item in the list box and note the value of the label.

WinForms RadListControl Selection Event

See Also

Telerik UI for WinForms Learning Resources

In this article