M
MattBell
I have a custom DataSourceControl which has a parameter collection defined as
a property on the object. While everything works just fine I'm having
problems with the design time implementation of the control. I'm getting an
error: 'DocumentDataSource' could not be set on property 'SelectParameters'
and the control won't render to the screen.
Now everything works fine at run time and the select parameters I've defined
operate great, but we're getting to the point where UI types will be getting
in here and messing with stuff and need to be able to access the control
which contains this data source.
I've looked around and it seems that the problem is the result of not having
the correct attributes set on the propery or the class.
The datasource has these attributes:
[
DefaultProperty("SelectParameters"),
Designer(typeof(ArgoDocumentDataSourceDesigner), typeof(IDesigner)),
ParseChildren(false),
PersistChildren(true)
]
the ParameterCollection has these
[
DefaultValue(null),
Editor(typeof(ParameterCollectionEditor), typeof(UITypeEditor)),
MergableProperty(false),
PersistenceMode(PersistenceMode.InnerProperty),
Category("Data"),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]
a property on the object. While everything works just fine I'm having
problems with the design time implementation of the control. I'm getting an
error: 'DocumentDataSource' could not be set on property 'SelectParameters'
and the control won't render to the screen.
Now everything works fine at run time and the select parameters I've defined
operate great, but we're getting to the point where UI types will be getting
in here and messing with stuff and need to be able to access the control
which contains this data source.
I've looked around and it seems that the problem is the result of not having
the correct attributes set on the propery or the class.
The datasource has these attributes:
[
DefaultProperty("SelectParameters"),
Designer(typeof(ArgoDocumentDataSourceDesigner), typeof(IDesigner)),
ParseChildren(false),
PersistChildren(true)
]
the ParameterCollection has these
[
DefaultValue(null),
Editor(typeof(ParameterCollectionEditor), typeof(UITypeEditor)),
MergableProperty(false),
PersistenceMode(PersistenceMode.InnerProperty),
Category("Data"),
DesignerSerializationVisibility(DesignerSerializationVisibility.Content)
]