ok, should be simple, but i'm having a hard time getting this to work. I have a combo box that is populated with the following.
This works fine but once the combo box is populated is where i'm having my trouble. I'm getting some values out of a database table that have the 'SubscriptionID' in it. How can I take the database value and then have the combo box selected based off of that value.
If i'm pulling a subscriptionID of '2' out of the database, i need to set the combo box to show 3352525233.
thanks.
Code:
da.Fill(ds, "Subscription");
cboSubscriptions.DataSource = ds.Tables["Subscription"];
cboSubscriptions.DisplayMember = "SubscriptionNo";
cboSubscriptions.ValueMember = "SubscriptionID";
Value Member DisplayMember
1 2323235235
2 3352525233
3 4564564564
etc....
This works fine but once the combo box is populated is where i'm having my trouble. I'm getting some values out of a database table that have the 'SubscriptionID' in it. How can I take the database value and then have the combo box selected based off of that value.
If i'm pulling a subscriptionID of '2' out of the database, i need to set the combo box to show 3352525233.
thanks.