Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public datatable
Message
De
23/05/2006 14:07:23
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01124311
Message ID:
01124342
Vues:
7
There must be some other code that you're not showing.

You have:

items.Columns.Add(col1);

but then, you use:

dr = ba.items.NewRow();

Two different variables?

~~Bonnie



>Ah, got it! Thanks!
>
>Now its telling me that there is no column called "line"?
>
>DataColumn col1 = new DataColumn("line");
>items.Columns.Add(col1);
>
>
>DataRow dr;
>dr = ba.items.NewRow();
>
>dr.BeginEdit();
>dr["line"] = ba.items.Rows.Count + 1;
>dr.EndEdit();
>
>ba.items.Rows.Add(dr);
>gridControl1.DataSource = ba.items;
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