code generation for a property of type DataSet

  • Thread starter Thread starter Ralf Hoeppner
  • Start date Start date
R

Ralf Hoeppner

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
Ralf
 
(e-mail address removed) (Ralf Hoeppner) wrote in
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.

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!
http://www.atozed.com/IntraWeb/
 
Back
Top