Databinding ComboBox in Windows Form
- From: that guy <thatguy@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 28 Oct 2005 21:37:19 GMT
Hey all,
I'm trying to create a Combobox that show the contents of a data table,
in a Windows Form. It's a Managed C++ project BTW.
I'm creating a DataTable (through an XML schema) with two elements
I've created a DataTable "members" with columns
ID UnsignedInt
name String
I've set the Combo properties (from the .NET 2003 Studio IDE)
DataSource to myDataSet.members
ValueMember to ID
DisplayValue to String
The DataTable is initially empty. I can add rows to the datatable just
fine. How do I make the Combobox display all the "name" values? I tried
Refresh() and Update(). If I remove the databinding I can populate the box
with Add(), but I'm not sure how to make this work with databinding.
Perhaps I'm misunderstanding how databinding is supposed to work? Also,
I'm a bit new with databases and Windows Forms, so if I misstated
something please forgive me.
that guy
.
- Follow-Ups:
- Re: Databinding ComboBox in Windows Form
- From: Stephen Howe
- Re: Databinding ComboBox in Windows Form
- Prev by Date: Re: Returning a single record: is adExecuteRecord a mistake in doc
- Next by Date: Re: Databinding ComboBox in Windows Form
- Previous by thread: Re: Query Analyzer bug
- Next by thread: Re: Databinding ComboBox in Windows Form
- Index(es):
Relevant Pages
|
|