Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Building Controls (http://www.velocityreviews.com/forums/f59-asp-net-building-controls.html)
-   -   Custom DataSourceControl with parameter collection at design time (http://www.velocityreviews.com/forums/t758283-custom-datasourcecontrol-with-parameter-collection-at-design-time.html)

MattBell 03-28-2006 10:09 PM

Custom DataSourceControl with parameter collection at design time
 
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(DesignerSerializat ionVisibility.Content)

]


dnz8000@gmail.com 04-20-2006 01:41 PM

Re: Custom DataSourceControl with parameter collection at design time
 
Hi MattBell,

I can't see it from the code you posted, but I suspect your collection
has a setter. It should only have a getter.


dnz8000@gmail.com 04-20-2006 01:43 PM

Re: Custom DataSourceControl with parameter collection at design time
 
Its the collection property that should be readonly...



All times are GMT. The time now is 01:55 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.