Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
01139097
Message ID:
01139334
Views:
10
You've only done part of the databinding when you set the DataSource. Now you need to bind the SelectedValue to your DataTable, which you do as follows:
this.MyCombo.DataBindings.Add("SelectedValue", this.MyOtherTable, "xjob_code");
~~Bonnie




>Hi
>I have a combobox bounded to a table where the display member and value member is different.
>Ex. Job Name and code.
>In creating a new entry, there is no problem , the user selects the job name and by using the selectedvalue property i get the job code and i save in the database.
>But during the edit part, i get the job code from the database and now i want the combo shld automatically select the corresponding job name.
>I tried using combo1.selectedvalue = xjob_code but it does not select that particular job name.
>
>Can any one help me for that.
>
>
>Thanks & Regards
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform