G
Guest
Hello ,
I have very mystic problem :
I have control, derrived from DataSourceControl,
I have property SelectExpression
[Editor(typeof(BSSelectExpressionsEditor), typeof(UITypeEditor))]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
PersistenceMode(PersistenceMode.InnerProperty)]
public SelectExpression SelectExpression
{
get {
if (selectExpression == null)
{
selectExpression = new SelectExpression();
//more code
}
return selectExpression;
}
}
SelectExpression has property SelectParameters
[
DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
PersistenceMode(PersistenceMode.InnerProperty),
RefreshProperties(RefreshProperties.All)]
public SelectParameterCollection SelectParameters
{
get
{
if (this.selectParameters == null)
{
this.selectParameters = new SelectParameterCollection();
}
return this.selectParameters;
}
}
final generated code in aspx page after using custom UITypeEditor looks
something like this :
<xxx:UserDataSource ID="ds" runat="server">
<SelectExpression Name="Result Expression" Operation="And">
<SelectParameters>
<col:SelectParameter DataType="System.String"
FieldValue="" Name="p1" Operation="Equals">
</col:SelectParameter>
<col:SelectParameter DataType="System.String"
FieldValue="" Name="p2" Operation="Equals">
</col:SelectParameter>
</SelectParameters>
</SelectExpression>
</xxx:UserDataSource>
When i switch to source from design view and back i get error on the
control :
Error Creating Control - ds
X.Collections.SelectParameterCollection must have items of type
'X.Collections.SelectParameter'. 'col:SelectParameter' is of type
'X.Collections.SelectParameter'.
What`s wrong ?
Thanks in advance for any help.
BTW i`m using BETA 2, maybe this is a bug?
Andre
I have very mystic problem :
I have control, derrived from DataSourceControl,
I have property SelectExpression
[Editor(typeof(BSSelectExpressionsEditor), typeof(UITypeEditor))]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
PersistenceMode(PersistenceMode.InnerProperty)]
public SelectExpression SelectExpression
{
get {
if (selectExpression == null)
{
selectExpression = new SelectExpression();
//more code
}
return selectExpression;
}
}
SelectExpression has property SelectParameters
[
DesignerSerializationVisibility(DesignerSerializationVisibility.Content),
PersistenceMode(PersistenceMode.InnerProperty),
RefreshProperties(RefreshProperties.All)]
public SelectParameterCollection SelectParameters
{
get
{
if (this.selectParameters == null)
{
this.selectParameters = new SelectParameterCollection();
}
return this.selectParameters;
}
}
final generated code in aspx page after using custom UITypeEditor looks
something like this :
<xxx:UserDataSource ID="ds" runat="server">
<SelectExpression Name="Result Expression" Operation="And">
<SelectParameters>
<col:SelectParameter DataType="System.String"
FieldValue="" Name="p1" Operation="Equals">
</col:SelectParameter>
<col:SelectParameter DataType="System.String"
FieldValue="" Name="p2" Operation="Equals">
</col:SelectParameter>
</SelectParameters>
</SelectExpression>
</xxx:UserDataSource>
When i switch to source from design view and back i get error on the
control :
Error Creating Control - ds
X.Collections.SelectParameterCollection must have items of type
'X.Collections.SelectParameter'. 'col:SelectParameter' is of type
'X.Collections.SelectParameter'.
What`s wrong ?
Thanks in advance for any help.
BTW i`m using BETA 2, maybe this is a bug?
Andre