PC Review


Reply
Thread Tools Rate Thread

Databinding ComboBox in Windows Form

 
 
that guy
Guest
Posts: n/a
 
      31st Oct 2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Databinding windows combobox to outlook 2007 data njdmello Microsoft C# .NET 0 14th May 2008 06:50 PM
Article on DataBinding in Windows form using VB.Net pedaammulu@yahoo.com Microsoft Dot NET 0 3rd Apr 2006 06:56 AM
Article on DataBinding in Windows form using VB.Net ammulu Microsoft ASP .NET 0 3rd Apr 2006 06:44 AM
Article on DataBinding in Windows form using VB.Net pedaammulu@yahoo.com Microsoft VB .NET 0 3rd Apr 2006 06:43 AM
Article on DataBinding in Windows form using VB.Net ammulu Microsoft ADO .NET 0 3rd Apr 2006 06:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:06 PM.