Reputation: 2982
I am new to winforms and I am trying to populate a dropdownlistbox with data returned from the database. I have a ClaimID & ClaimType.
I can't seem to get the syntax correct. Can anyone help please?
Upvotes: 1
Views: 1756
Reputation: 6583
if your data is in datatable named dt, then
ComboBox1.ValueMember = "ClaimId"
ComboBox1.DisplayMember = "ClaimType"
ComboBox1.DataSource = dt
Upvotes: 1