Hello Kaustubh,
As far as I understand, you want to display the Title property in RadComboBox, but use the ID property. For this to happen you need to bind the control to a collection of objects that have Title and ID properties, something like this:
public class DataItem
{
public int ID { get; set; }
public string Title { get; set; }
}
// You should modify your Linq query and use it here instead of the new list
combobox.ItemsSource = new List<DataItem>();
combobox.DisplayMemberPath = "Title";
combobox.SelectedValuePath = "ID";
...
var id = combobox.SelectedValue; // The ID of the selected DataItem
I hope this helps.
All the best,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the
Telerik Public Issue Tracking system and vote to affect the priority of the items