Hi Guys,

I have a Dataset which has been populated correctly now (after a bit of a blonde moment earlier).

I've decided to go for a ComboBox Drop-Down option which currently is showing the "companyname" Column of the DataSet.

However, How do I go about Getting Text boxes to To populate with the relevent information from the Company that has been selected in the 'ComboBox' ? (If that makes sense?)

For Example:
Company 1 selecting in the ComboBox.

Text Boxes below need to populate with that Companies Details.

Thanks for your help.

Regards
Mark.

Recommended Answers

All 2 Replies

Are you just putting the text into your combo box? It might be worth creating a special data item that you populate it with. When you select the item, it pulls this data object out that contains your data.

Alternatively, do a look up on your table for Company 1 in the right column when you select it. This will allow you to find the other data in the row.

Finally, put the row id in the tag for the combo box item. Then just pull back the row data based on the id.

Are you using WinForms or WPF? WPF would be really good at this, I've not done much work in DataBinding on WinForms, but it's fairly easy in WPF.

Thanks Ketsue, I will try this out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.