New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
Displaying and Selecting Items in RadMultiSelect on Page Load
Updated on Feb 23, 2026
Environment
| Product | UI for ASP.NET AJAX RadMultiSelect |
| Version | All |
Description
I want to bind a RadMultiSelect control to a data source, display all items initially, and select them on page load. Additionally, I want to retrieve a unique identifier (e.g., ID) for each selected item when an item is removed from the list.
This knowledge base article also answers the following questions:
- How to select and display items on initial load in RadMultiSelect?
- How to bind RadMultiSelect to a data source and set initial selection?
- How to retrieve unique identifiers for selected items in RadMultiSelect?
Solution
To display and select items on page load, bind the RadMultiSelect to the data source and set the Value property to the desired values. To retrieve unique identifiers, set the DataValueField to the identifier property and DataTextField to the display property.
Example Code
ASP.NET
<telerik:RadMultiSelect ID="RadMultiSelect1" runat="server" Width="500px" DataTextField="DisplayName" DataValueField="UserID" />
C#
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
IEnumerable<MyClass> items = Enumerable.Range(0, 10).Select(x => new MyClass()
{
ID = x,
Name = "Name " + x,
Title = "Title " + x
});
string[] selectedValues = items.Select(i => i.ID.ToString()).ToArray();
RadMultiSelect1.DataSource = items;
RadMultiSelect1.DataBind();
RadMultiSelect1.Value = selectedValues;
}
}
public class MyClass
{
public int ID { get; set; }
public string Name { get; set; }
public string Title { get; set; }
}
- Set
DataTextFieldto the property used for display (DisplayName). - Set
DataValueFieldto the property used for unique identification (UserID). - Populate the
Valueproperty with the identifiers of the items to be selected initially.