Given a combobox (cbClient dropdown) - the user can select one of the items listed in the combobox and when he does I need to know what item he selected. The combobox is populated by a DataSet (as shown in the code below), everytime I try to get the value of the selected item I get "System.Data.DataRowView" instead ???
So I am trying to get sSelectedClient to be = the selected client from the DrownDown Combobox.... but thats not what I am getting.
Do I need to CAST it somehow, into like a DATASET and then extract it as such? If so how would I go about doing that?
Any help/hints would be greatly appreciated
Code:
System.Data.DataSet ds = new System.Data.DataSet();
ds = Database.Read("select * from [TaskTimer$]");
cbClient.SelectedIndex = -1;
cbClient.DataSource = ds.Tables[0];
cbClient.DisplayMember = "CLIENTS";
cbClient.ValueMember = "CLIENTS";
...
... The user can do stuff like select a Client from the ComboBox DropDown
...
string sSelectedClient = cbClient.SelectedItem.ToString();
So I am trying to get sSelectedClient to be = the selected client from the DrownDown Combobox.... but thats not what I am getting.
Do I need to CAST it somehow, into like a DATASET and then extract it as such? If so how would I go about doing that?
Any help/hints would be greatly appreciated