W
William Stacey [MVP]
Is there a way to get a ref to an object (say a instantiated class) in a
column of a datarow? Some other trick or workaround?
column of a datarow? Some other trick or workaround?
William Stacey said:Thanks Teemu. Guess I just should have tried it, but the doco just showed
the native types
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003APR.1033/cpref/html/frlrfsystemdatadat
acolumnclassdatatypetopic.htm
Thanks again.
Teemu Keiski said:Hmm, not sure what you mean, but if you create the DataTable yourself, you
can specify the column type to be some custom type. For example:
DataTable dt=new DataTable();
dt.Columns.Add("thePoint",typeof(Point));
DataRow dr=dt.NewRow();
Point pt=new Point(5,5);
dr[0]=pt;
dt.Rows.Add(dr);
--
Teemu Keiski
MCP, Designer/Developer
Mansoft tietotekniikka Oy
http://www.mansoft.fi
ASP.NET Forums Moderator, www.asp.net
AspAlliance Columnist, www.aspalliance.com
Email:
(e-mail address removed)
William Stacey said:Is there a way to get a ref to an object (say a instantiated class) in a
column of a datarow? Some other trick or workaround?