Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Populate a combobox with the fieldnames of a table
Message
De
06/10/2007 20:46:14
 
 
À
06/10/2007 13:42:17
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01259126
Message ID:
01259213
Vues:
13
Yeah, Viv, it works. I just tried it.

Ernst, try this:
BindingSource bs = new BindingSource();
bs.DataSource = this.MyTable.Columns;
this.MyCombo.DataSource = bs;
~~Bonnie



>Hi,
>
>I would think that since the DataColumns collection supports IEnumerable you should be able to bind to it using a BindingSource. Haven't tried it tho'
>HTH,
>Viv
>
>>how do i populate a combobox with the fieldnames of a table or DB Object?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform