Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Public datatable
Message
From
23/05/2006 14:07:23
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01124311
Message ID:
01124342
Views:
9
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform