This question is locked. New answers and comments are not allowed.
Hi,
If I bind to a datatable, how can I get the ID of the selected item in the combo box. I have added the following code
If I bind to a datatable, how can I get the ID of the selected item in the combo box. I have added the following code
Dim pobjTable As New Data.DataTable
pobjTable.Columns.Add("ID")
pobjTable.Columns.Add("Name")
pobjTable.Rows.Add(1001, "User A")
pobjTable.Rows.Add(1002, "User C")
pobjTable.Rows.Add(1003, "User B")
RadComboBox1.DataSource = pobjTable
RadComboBox1.DisplayMember = "Name"
So if User C is selected, I would like to get 1002 back as the ID.
Note: This is possible in the VB.Net Combo Box if you create a class to store the ID and the Text Value. You can add an object to the List and return the Object once selected.
Best Regards
Eddie