Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DataSet, DataTable, DataView
Message
From
29/07/2004 16:30:00
 
 
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00928619
Message ID:
00929341
Views:
18
There ya go ... =)

~~Bonnie

>Thanks (slaps forehead repeatedly). Blame it on rapid typing and an empty stomach.
>
>So in this case, it's not necessary to instantiate the object with a new()...
>
>Once more, with feeling...
>
>
>1) the class
>
>using System;
>using System.Data;
>
>public class MyLocalData
>{
>	private static DataTable _DtCustomers;
>	public static DataTable DtCustomers
>	{
>		get {return _DtCustomers ;}
>		set {_DtCustomers = value;}
>	}
>
>       // if you need to utilize a binding manager, or other data, you could add it here
>}
>
>
>2) first form
>
>MyLocalData.DtCustomers = oBusinessLayer.RetrieveCustomers();
>DataRow Dr = MyLocalData.DtCustomers.NewRow();
>Dr["FirstName"] = "JOHN";
>MyLocalData.DtCustomers.Rows.Add(Dr);
>
>
>3) second form
>
>dataGrid1.DataSource = MyLocalData.DtCustomers;
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Reply
Map
View

Click here to load this message in the networking platform