Hello All -
I have a C# Forms app with a listbox I am populating from the DB via a DataSet. The SQL statement returns just two columns. I thought I was setting the DisplayMember and ValueMember correctly, but the listbox displays the column I specified as ValueMember. Here is the code with 'list' being my DataSet:
listBoxClientList.DataSour
ce = list.Tables[0];
listBoxClientList.DisplayM
ember = "STRSTRING";
listBoxClientList.ValueMem
ber = "ID";
The ID column is what I end up seeing in the listbox. I've debugged this and everything seems OK.
Any assistance would be appreciated.
Start Free Trial