all groups > dotnet clr > october 2004 >
You're in the

dotnet clr

group:

code generation for a property of type DataSet


code generation for a property of type DataSet ralf.hoeppner NO[at]SPAM web.de
10/27/2004 2:56:49 AM
dotnet clr:
I have a form which contains a property of type System.Data.DataSet.
I assign a DataSet to this property at design-time the forms designer.
When I now check the dataSet property in the property browser the
values are there, but they are not serialized into the formcode.

Property:

[Bindable(true),Category("Data"),
TypeConverter("System.Windows.Forms.Design.DataSourceConverter,
System.Design"),DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public DataSet InputDataSet
{
get
{
return m_inputDS;
}
}

Designer Code:
....
PropertyDescriptor propDS =
TypeDescriptor.GetProperties(myForm)["InputDataSet"];
if (propDS != null)
{
((DataSet)propDS.GetValue(myForm)).Merge(ds);
}
....

I'd really appreciate if someone could help me with that problem.

best regards
Re: code generation for a property of type DataSet Chad Z. Hower aka Kudzu
10/27/2004 9:09:25 AM
ralf.hoeppner@web.de (Ralf Hoeppner) wrote in
news:7c065cd9.0410270156.6e7fd182@posting.google.com:
[quoted text, click to view]

This is becuase a dataset is very large and would be difficult to put in the
form code. IIRC it puts itself into a resource, and then loads itself from
the resource.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Get your ASP.NET in gear with IntraWeb!
AddThis Social Bookmark Button