Hi,
I cannot figure out the syntax to bind an ADO.NET DataTable to a Rad Combobox. Can you please help me by posting some source code on how to accomplish the following task:
I have a DataTable fo countries that has an id column and a name column. I want to show the country name in the combo box but when an item is selected in the combo box, I want to return the id. This is a very common task in asp.net and win forms but I cannot figure out how to do this task using the rad combo box.
How would I accomplish something like this using the rad combo box?
DataTable dt = GetCountries();
This.cboCountries.DataText = “Country”;
This.cboCountries.DataValue = “id”;
This.cboCountries.DataSource = dt;
This.cboCountries.DataBind();
…
// get the selected id in the combo box
Int id = this.cboCountries.SelectedValue;
Can you please post the correct syntax to accomplish this task using the rad combo box.
Thanks for the help!
Bill