Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Expandable properties in propertygrid not working

Reply
Thread Tools

Expandable properties in propertygrid not working

 
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      09-24-2003
I am trying to create expandable properties in the propertygrid for a custom
control i am building but it wont work. I have derived my TypeConverter
from ExpandableObjectoConverter. I have overridden :
CanConvertFrom,ConvertFrom,ConvertTo,CanConvertTo. I know exactly what these
do. I have read the docs thoroughly and properly implemented it all. Still
the properties thats supposed to be expandable arent for some reason. I have
been struggling with this for a few hours now. To simplify this i have
created a small test application with my implementation. Can anybody give it
a look and let me know where i went wrong and what i should be doing
instead.
Thanks


Imports System.ComponentModel
Imports System.ComponentModel.Design.Serialization
Imports System.Web.UI

<DefaultProperty("Text"), _
ToolboxData("<{0}:WebCustomControl1 runat=server></{0}:WebCustomControl1>")>
_
Public Class WebCustomControl1
Inherits System.Web.UI.WebControls.WebControl

Dim _text As String

<Bindable(True), Category("Appearance"), DefaultValue("")> Property
[Text]() As String
Get
Return _text
End Get

Set(ByVal Value As String)
_text = Value
End Set
End Property

Protected Overrides Sub Render(ByVal output As
System.Web.UI.HtmlTextWriter)
output.Write([Text])
End Sub

End Class
<TypeConverter(GetType(ExpandablePropertiesTypeCon verter)),
Category("Appearance"), _
DescriptionAttribute("Two expandable properties")> _
Public Class ExpandableProperties
Private _sampleValue1 As Boolean = True
Private _sampleValue2 As Boolean = True
<DefaultValueAttribute(True), _
Description("Expandable property 2")> _
Public Property [sampleValue1]() As Boolean
Get
Return _sampleValue1
End Get

Set(ByVal Value As Boolean)
_sampleValue1 = Value
End Set
End Property

<DefaultValueAttribute(True), _
Description("Expandable property 2")> _
Public Property [sampleValue2]() As Boolean
Get
Return _sampleValue2
End Get

Set(ByVal Value As Boolean)
_sampleValue2 = Value
End Set
End Property
End Class


------------ Then in a seperate file i got the type converter class:
ExpandablePropertiesTypeConverter.vb ----------------------------

Imports System.ComponentModel
Imports System.Globalization
Public Class ExpandablePropertiesTypeConverter : Inherits
ExpandableObjectConverter
' Overrides the CanConvertFrom method of TypeConverter.
Public Overloads Overrides Function CanConvertFrom(ByVal context As
ITypeDescriptorContext, ByVal sourceType As Type) As Boolean
If sourceType Is GetType(String) Then
Return True
End If
Return MyBase.CanConvertFrom(context, sourceType)
End Function
' Overrides the ConvertFrom method of TypeConverter.
Public Overloads Overrides Function ConvertFrom(ByVal context As
ITypeDescriptorContext, ByVal culture As CultureInfo, ByVal value As Object)
As Object
If (TypeOf value Is String) Then
Try
Dim s As String = CStr(value)
Dim colon As Integer = s.IndexOf(":")
Dim comma As Integer = s.IndexOf(",")

If (colon <> -1 AndAlso comma <> -1) Then
Dim samplevalue1 As String = s.Substring(colon + 1, _
(comma - colon - 1))

colon = s.IndexOf(":", comma + 1)
comma = s.IndexOf(",", comma + 1)

Dim samplevalue2 As String = s.Substring(colon + 1, _
(comma - colon - 1))

Dim control1 As ExpandableProperties = New
ExpandableProperties()

control1.sampleValue1 = Boolean.Parse(samplevalue1)
control1.sampleValue2 = Boolean.Parse(samplevalue2)

Return control1
End If
Catch
Throw New ArgumentException( _
"Can not convert '" & CStr(value) & _
"' to type windowAttributes")

End Try
End If
Return MyBase.ConvertFrom(context, culture, value)

End Function

' Overrides the ConvertTo method of TypeConverter.
Public Overloads Overrides Function ConvertTo(ByVal context As
ITypeDescriptorContext, ByVal culture As CultureInfo, ByVal value As Object,
ByVal destinationType As Type) As Object
If (destinationType Is GetType(System.String) _
AndAlso TypeOf value Is ExpandableProperties) Then

Dim control1 As ExpandableProperties = CType(value,
ExpandableProperties)
Return "Sample1:" & control1.sampleValue1 & ", Sample2:" &
control1.sampleValue2
End If
Return MyBase.ConvertTo(context, culture, value, destinationType)
End Function

Public Overloads Overrides Function CanConvertTo( _
ByVal context As ITypeDescriptorContext, _
ByVal destinationType As Type) As Boolean
If (destinationType Is GetType(ExpandableProperties)) Then
Return True
End If
Return MyBase.CanConvertFrom(context, destinationType)
End Function
End Class


 
Reply With Quote
 
 
 
 
Fredrik Normén NSQUARED
Guest
Posts: n/a
 
      09-24-2003
If you want to diplay your properties in the VS.NET
Property window you simply add some attributes before
your property.

[Browsable(true),Category("Behavior"),
DefaultValue(""),
Description("")]
publuc string myProperty

This will not work if you create a Web User control.

I hope this is what you are looking for.

/Fredrik Normén NSQUARED2


>-----Original Message-----
>I am trying to create expandable properties in the

propertygrid for a custom
>control i am building but it wont work. I have derived

my TypeConverter
>from ExpandableObjectoConverter. I have overridden :
>CanConvertFrom,ConvertFrom,ConvertTo,CanConvertTo . I

know exactly what these
>do. I have read the docs thoroughly and properly

implemented it all. Still
>the properties thats supposed to be expandable arent for

some reason. I have
>been struggling with this for a few hours now. To

simplify this i have
>created a small test application with my implementation.

Can anybody give it
>a look and let me know where i went wrong and what i

should be doing
>instead.
>Thanks
>
>
>Imports System.ComponentModel
>Imports System.ComponentModel.Design.Serialization
>Imports System.Web.UI
>
><DefaultProperty("Text"), _
>ToolboxData("<{0}:WebCustomControl1 runat=server></

{0}:WebCustomControl1>")>
>_
>Public Class WebCustomControl1
> Inherits System.Web.UI.WebControls.WebControl
>
> Dim _text As String
>
> <Bindable(True), Category("Appearance"), DefaultValue

("")> Property
>[Text]() As String
> Get
> Return _text
> End Get
>
> Set(ByVal Value As String)
> _text = Value
> End Set
> End Property
>
> Protected Overrides Sub Render(ByVal output As
>System.Web.UI.HtmlTextWriter)
> output.Write([Text])
> End Sub
>
>End Class
><TypeConverter(GetType

(ExpandablePropertiesTypeConverter)),
>Category("Appearance"), _
> DescriptionAttribute("Two expandable properties")> _
> Public Class ExpandableProperties
> Private _sampleValue1 As Boolean = True
> Private _sampleValue2 As Boolean = True
> <DefaultValueAttribute(True), _
> Description("Expandable property 2")> _
> Public Property [sampleValue1]() As Boolean
> Get
> Return _sampleValue1
> End Get
>
> Set(ByVal Value As Boolean)
> _sampleValue1 = Value
> End Set
> End Property
>
> <DefaultValueAttribute(True), _
> Description("Expandable property 2")> _
> Public Property [sampleValue2]() As Boolean
> Get
> Return _sampleValue2
> End Get
>
> Set(ByVal Value As Boolean)
> _sampleValue2 = Value
> End Set
> End Property
>End Class
>
>
>------------ Then in a seperate file i got the type

converter class:
>ExpandablePropertiesTypeConverter.vb -------------------

---------
>
>Imports System.ComponentModel
>Imports System.Globalization
>Public Class ExpandablePropertiesTypeConverter : Inherits
>ExpandableObjectConverter
> ' Overrides the CanConvertFrom method of

TypeConverter.
> Public Overloads Overrides Function CanConvertFrom

(ByVal context As
>ITypeDescriptorContext, ByVal sourceType As Type) As

Boolean
> If sourceType Is GetType(String) Then
> Return True
> End If
> Return MyBase.CanConvertFrom(context, sourceType)
> End Function
> ' Overrides the ConvertFrom method of TypeConverter.
> Public Overloads Overrides Function ConvertFrom

(ByVal context As
>ITypeDescriptorContext, ByVal culture As CultureInfo,

ByVal value As Object)
>As Object
> If (TypeOf value Is String) Then
> Try
> Dim s As String = CStr(value)
> Dim colon As Integer = s.IndexOf(":")
> Dim comma As Integer = s.IndexOf(",")
>
> If (colon <> -1 AndAlso comma <> -1) Then
> Dim samplevalue1 As String =

s.Substring(colon + 1, _
>

(comma - colon - 1))
>
> colon = s.IndexOf(":", comma + 1)
> comma = s.IndexOf(",", comma + 1)
>
> Dim samplevalue2 As String =

s.Substring(colon + 1, _
>

(comma - colon - 1))
>
> Dim control1 As ExpandableProperties

= New
>ExpandableProperties()
>
> control1.sampleValue1 = Boolean.Parse

(samplevalue1)
> control1.sampleValue2 = Boolean.Parse

(samplevalue2)
>
> Return control1
> End If
> Catch
> Throw New ArgumentException( _
> "Can not convert '" & CStr(value) & _
> "' to type

windowAttributes")
>
> End Try
> End If
> Return MyBase.ConvertFrom(context, culture,

value)
>
> End Function
>
> ' Overrides the ConvertTo method of TypeConverter.
> Public Overloads Overrides Function ConvertTo(ByVal

context As
>ITypeDescriptorContext, ByVal culture As CultureInfo,

ByVal value As Object,
>ByVal destinationType As Type) As Object
> If (destinationType Is GetType(System.String) _
> AndAlso TypeOf value Is

ExpandableProperties) Then
>
> Dim control1 As ExpandableProperties = CType

(value,
>ExpandableProperties)
> Return "Sample1:" & control1.sampleValue1

& ", Sample2:" &
>control1.sampleValue2
> End If
> Return MyBase.ConvertTo(context, culture, value,

destinationType)
> End Function
>
> Public Overloads Overrides Function CanConvertTo( _
> ByVal context As

ITypeDescriptorContext, _
> ByVal destinationType

As Type) As Boolean
> If (destinationType Is GetType

(ExpandableProperties)) Then
> Return True
> End If
> Return MyBase.CanConvertFrom(context,

destinationType)
> End Function
>End Class
>
>
>.
>

 
Reply With Quote
 
 
 
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      09-24-2003
hi fredrik, this is not what I am looking for.

"Fredrik Normén NSQUARED" <(E-Mail Removed)> wrote in message
news:d7b401c38282$9a968160$(E-Mail Removed)...
If you want to diplay your properties in the VS.NET
Property window you simply add some attributes before
your property.

[Browsable(true),Category("Behavior"),
DefaultValue(""),
Description("")]
publuc string myProperty

This will not work if you create a Web User control.

I hope this is what you are looking for.

/Fredrik Normén NSQUARED2


>-----Original Message-----
>I am trying to create expandable properties in the

propertygrid for a custom
>control i am building but it wont work. I have derived

my TypeConverter
>from ExpandableObjectoConverter. I have overridden :
>CanConvertFrom,ConvertFrom,ConvertTo,CanConvertTo . I

know exactly what these
>do. I have read the docs thoroughly and properly

implemented it all. Still
>the properties thats supposed to be expandable arent for

some reason. I have
>been struggling with this for a few hours now. To

simplify this i have
>created a small test application with my implementation.

Can anybody give it
>a look and let me know where i went wrong and what i

should be doing
>instead.
>Thanks
>
>
>Imports System.ComponentModel
>Imports System.ComponentModel.Design.Serialization
>Imports System.Web.UI
>
><DefaultProperty("Text"), _
>ToolboxData("<{0}:WebCustomControl1 runat=server></

{0}:WebCustomControl1>")>
>_
>Public Class WebCustomControl1
> Inherits System.Web.UI.WebControls.WebControl
>
> Dim _text As String
>
> <Bindable(True), Category("Appearance"), DefaultValue

("")> Property
>[Text]() As String
> Get
> Return _text
> End Get
>
> Set(ByVal Value As String)
> _text = Value
> End Set
> End Property
>
> Protected Overrides Sub Render(ByVal output As
>System.Web.UI.HtmlTextWriter)
> output.Write([Text])
> End Sub
>
>End Class
><TypeConverter(GetType

(ExpandablePropertiesTypeConverter)),
>Category("Appearance"), _
> DescriptionAttribute("Two expandable properties")> _
> Public Class ExpandableProperties
> Private _sampleValue1 As Boolean = True
> Private _sampleValue2 As Boolean = True
> <DefaultValueAttribute(True), _
> Description("Expandable property 2")> _
> Public Property [sampleValue1]() As Boolean
> Get
> Return _sampleValue1
> End Get
>
> Set(ByVal Value As Boolean)
> _sampleValue1 = Value
> End Set
> End Property
>
> <DefaultValueAttribute(True), _
> Description("Expandable property 2")> _
> Public Property [sampleValue2]() As Boolean
> Get
> Return _sampleValue2
> End Get
>
> Set(ByVal Value As Boolean)
> _sampleValue2 = Value
> End Set
> End Property
>End Class
>
>
>------------ Then in a seperate file i got the type

converter class:
>ExpandablePropertiesTypeConverter.vb -------------------

---------
>
>Imports System.ComponentModel
>Imports System.Globalization
>Public Class ExpandablePropertiesTypeConverter : Inherits
>ExpandableObjectConverter
> ' Overrides the CanConvertFrom method of

TypeConverter.
> Public Overloads Overrides Function CanConvertFrom

(ByVal context As
>ITypeDescriptorContext, ByVal sourceType As Type) As

Boolean
> If sourceType Is GetType(String) Then
> Return True
> End If
> Return MyBase.CanConvertFrom(context, sourceType)
> End Function
> ' Overrides the ConvertFrom method of TypeConverter.
> Public Overloads Overrides Function ConvertFrom

(ByVal context As
>ITypeDescriptorContext, ByVal culture As CultureInfo,

ByVal value As Object)
>As Object
> If (TypeOf value Is String) Then
> Try
> Dim s As String = CStr(value)
> Dim colon As Integer = s.IndexOf(":")
> Dim comma As Integer = s.IndexOf(",")
>
> If (colon <> -1 AndAlso comma <> -1) Then
> Dim samplevalue1 As String =

s.Substring(colon + 1, _
>

(comma - colon - 1))
>
> colon = s.IndexOf(":", comma + 1)
> comma = s.IndexOf(",", comma + 1)
>
> Dim samplevalue2 As String =

s.Substring(colon + 1, _
>

(comma - colon - 1))
>
> Dim control1 As ExpandableProperties

= New
>ExpandableProperties()
>
> control1.sampleValue1 = Boolean.Parse

(samplevalue1)
> control1.sampleValue2 = Boolean.Parse

(samplevalue2)
>
> Return control1
> End If
> Catch
> Throw New ArgumentException( _
> "Can not convert '" & CStr(value) & _
> "' to type

windowAttributes")
>
> End Try
> End If
> Return MyBase.ConvertFrom(context, culture,

value)
>
> End Function
>
> ' Overrides the ConvertTo method of TypeConverter.
> Public Overloads Overrides Function ConvertTo(ByVal

context As
>ITypeDescriptorContext, ByVal culture As CultureInfo,

ByVal value As Object,
>ByVal destinationType As Type) As Object
> If (destinationType Is GetType(System.String) _
> AndAlso TypeOf value Is

ExpandableProperties) Then
>
> Dim control1 As ExpandableProperties = CType

(value,
>ExpandableProperties)
> Return "Sample1:" & control1.sampleValue1

& ", Sample2:" &
>control1.sampleValue2
> End If
> Return MyBase.ConvertTo(context, culture, value,

destinationType)
> End Function
>
> Public Overloads Overrides Function CanConvertTo( _
> ByVal context As

ITypeDescriptorContext, _
> ByVal destinationType

As Type) As Boolean
> If (destinationType Is GetType

(ExpandableProperties)) Then
> Return True
> End If
> Return MyBase.CanConvertFrom(context,

destinationType)
> End Function
>End Class
>
>
>.
>



 
Reply With Quote
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      09-24-2003
Just in case nobody is looking at this thinking I want someone to make
corrections to my code, this is not the case. The reason I put sample code
is to show that I have followed whatever documentation microsoft had on
expandable properties and its not working for me. Has anybody dealt with
this before. That is when trying to implement expandable properties and it
dont work. I dont end up with errors either, those properties never show in
the propertygrid. Not as expandable properties or the normal expanded
properties. Just nada.

"Alessandro Zifiglio" <(E-Mail Removed)> wrote in message
news:Ooecb.465$(E-Mail Removed)...
> hi fredrik, this is not what I am looking for.
>
> "Fredrik Normén NSQUARED" <(E-Mail Removed)> wrote in message
> news:d7b401c38282$9a968160$(E-Mail Removed)...
> If you want to diplay your properties in the VS.NET
> Property window you simply add some attributes before
> your property.
>
> [Browsable(true),Category("Behavior"),
> DefaultValue(""),
> Description("")]
> publuc string myProperty
>
> This will not work if you create a Web User control.
>
> I hope this is what you are looking for.
>
> /Fredrik Normén NSQUARED2
>
>
> >-----Original Message-----
> >I am trying to create expandable properties in the

> propertygrid for a custom
> >control i am building but it wont work. I have derived

> my TypeConverter
> >from ExpandableObjectoConverter. I have overridden :
> >CanConvertFrom,ConvertFrom,ConvertTo,CanConvertTo . I

> know exactly what these
> >do. I have read the docs thoroughly and properly

> implemented it all. Still
> >the properties thats supposed to be expandable arent for

> some reason. I have
> >been struggling with this for a few hours now. To

> simplify this i have
> >created a small test application with my implementation.

> Can anybody give it
> >a look and let me know where i went wrong and what i

> should be doing
> >instead.
> >Thanks
> >
> >
> >Imports System.ComponentModel
> >Imports System.ComponentModel.Design.Serialization
> >Imports System.Web.UI
> >
> ><DefaultProperty("Text"), _
> >ToolboxData("<{0}:WebCustomControl1 runat=server></

> {0}:WebCustomControl1>")>
> >_
> >Public Class WebCustomControl1
> > Inherits System.Web.UI.WebControls.WebControl
> >
> > Dim _text As String
> >
> > <Bindable(True), Category("Appearance"), DefaultValue

> ("")> Property
> >[Text]() As String
> > Get
> > Return _text
> > End Get
> >
> > Set(ByVal Value As String)
> > _text = Value
> > End Set
> > End Property
> >
> > Protected Overrides Sub Render(ByVal output As
> >System.Web.UI.HtmlTextWriter)
> > output.Write([Text])
> > End Sub
> >
> >End Class
> ><TypeConverter(GetType

> (ExpandablePropertiesTypeConverter)),
> >Category("Appearance"), _
> > DescriptionAttribute("Two expandable properties")> _
> > Public Class ExpandableProperties
> > Private _sampleValue1 As Boolean = True
> > Private _sampleValue2 As Boolean = True
> > <DefaultValueAttribute(True), _
> > Description("Expandable property 2")> _
> > Public Property [sampleValue1]() As Boolean
> > Get
> > Return _sampleValue1
> > End Get
> >
> > Set(ByVal Value As Boolean)
> > _sampleValue1 = Value
> > End Set
> > End Property
> >
> > <DefaultValueAttribute(True), _
> > Description("Expandable property 2")> _
> > Public Property [sampleValue2]() As Boolean
> > Get
> > Return _sampleValue2
> > End Get
> >
> > Set(ByVal Value As Boolean)
> > _sampleValue2 = Value
> > End Set
> > End Property
> >End Class
> >
> >
> >------------ Then in a seperate file i got the type

> converter class:
> >ExpandablePropertiesTypeConverter.vb -------------------

> ---------
> >
> >Imports System.ComponentModel
> >Imports System.Globalization
> >Public Class ExpandablePropertiesTypeConverter : Inherits
> >ExpandableObjectConverter
> > ' Overrides the CanConvertFrom method of

> TypeConverter.
> > Public Overloads Overrides Function CanConvertFrom

> (ByVal context As
> >ITypeDescriptorContext, ByVal sourceType As Type) As

> Boolean
> > If sourceType Is GetType(String) Then
> > Return True
> > End If
> > Return MyBase.CanConvertFrom(context, sourceType)
> > End Function
> > ' Overrides the ConvertFrom method of TypeConverter.
> > Public Overloads Overrides Function ConvertFrom

> (ByVal context As
> >ITypeDescriptorContext, ByVal culture As CultureInfo,

> ByVal value As Object)
> >As Object
> > If (TypeOf value Is String) Then
> > Try
> > Dim s As String = CStr(value)
> > Dim colon As Integer = s.IndexOf(":")
> > Dim comma As Integer = s.IndexOf(",")
> >
> > If (colon <> -1 AndAlso comma <> -1) Then
> > Dim samplevalue1 As String =

> s.Substring(colon + 1, _
> >

> (comma - colon - 1))
> >
> > colon = s.IndexOf(":", comma + 1)
> > comma = s.IndexOf(",", comma + 1)
> >
> > Dim samplevalue2 As String =

> s.Substring(colon + 1, _
> >

> (comma - colon - 1))
> >
> > Dim control1 As ExpandableProperties

> = New
> >ExpandableProperties()
> >
> > control1.sampleValue1 = Boolean.Parse

> (samplevalue1)
> > control1.sampleValue2 = Boolean.Parse

> (samplevalue2)
> >
> > Return control1
> > End If
> > Catch
> > Throw New ArgumentException( _
> > "Can not convert '" & CStr(value) & _
> > "' to type

> windowAttributes")
> >
> > End Try
> > End If
> > Return MyBase.ConvertFrom(context, culture,

> value)
> >
> > End Function
> >
> > ' Overrides the ConvertTo method of TypeConverter.
> > Public Overloads Overrides Function ConvertTo(ByVal

> context As
> >ITypeDescriptorContext, ByVal culture As CultureInfo,

> ByVal value As Object,
> >ByVal destinationType As Type) As Object
> > If (destinationType Is GetType(System.String) _
> > AndAlso TypeOf value Is

> ExpandableProperties) Then
> >
> > Dim control1 As ExpandableProperties = CType

> (value,
> >ExpandableProperties)
> > Return "Sample1:" & control1.sampleValue1

> & ", Sample2:" &
> >control1.sampleValue2
> > End If
> > Return MyBase.ConvertTo(context, culture, value,

> destinationType)
> > End Function
> >
> > Public Overloads Overrides Function CanConvertTo( _
> > ByVal context As

> ITypeDescriptorContext, _
> > ByVal destinationType

> As Type) As Boolean
> > If (destinationType Is GetType

> (ExpandableProperties)) Then
> > Return True
> > End If
> > Return MyBase.CanConvertFrom(context,

> destinationType)
> > End Function
> >End Class
> >
> >
> >.
> >

>
>



 
Reply With Quote
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      09-25-2003
Will somebody from Microsoft reply. It is important that I be able to
implement expandable properties. If I've been doing it right then maybe
someone knows of a workaround I could use to get this running for me? For
all I can think of right now is that this could be a bug with the vb.net
version.
I'm already behind schedule. I am desperate.
Microsoft !!!


 
Reply With Quote
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      09-25-2003

"Alessandro Zifiglio" <(E-Mail Removed)> wrote in message
news:j5Acb.988$(E-Mail Removed)...
> Will somebody from Microsoft reply. It is important that I be able to
> implement expandable properties. If I've been doing it right then maybe
> someone knows of a workaround I could use to get this running for me? For
> all I can think of right now is that this could be a bug with the vb.net
> version.
> I'm already behind schedule. I am desperate.
> Microsoft !!!
>
>



 
Reply With Quote
 
Alessandro Zifiglio
Guest
Posts: n/a
 
      09-25-2003
Why am i being ignored. I see the guys from microsoft responding but wont
aknowledge my post.

It cant be so hard to reproduce my problem. I even included a sample project
to simplify. Still no answer


 
Reply With Quote
 
Memi Lavi
Guest
Posts: n/a
 
      10-07-2003
"Alessandro Zifiglio" <(E-Mail Removed)> wrote in message news:<2RCcb.1033$(E-Mail Removed)>...
> Why am i being ignored. I see the guys from microsoft responding but wont
> aknowledge my post.
>
> It cant be so hard to reproduce my problem. I even included a sample project
> to simplify. Still no answer


If you want the property to appear in the property grid, you must
declare public property in the 'WebCustomControl1' control with the
type of 'ExpandableProperties'. In your code there is no property for
that class.

Also, be sure to 'New' the private variable of the property when
declaring it, or else you won't be able to access the property in the
property grid.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing DisplayNames of my properties using PropertyGrid component, how ?? Tugrul HELVACI ASP .Net 3 12-05-2006 03:04 AM
PropertyGrid-Need HELP =?Utf-8?B?RGVlcGFr?= ASP .Net 2 07-15-2005 08:40 AM
Expandable Properties in DataBinding Dialog -j via .NET 247 ASP .Net Building Controls 0 06-15-2004 08:35 PM
PropertyGrid - ReadOnly Dave Wurtz ASP .Net 2 11-14-2003 04:55 PM
Expandable properties in propertygrid not working Alessandro Zifiglio ASP .Net Building Controls 11 09-26-2003 09:29 PM



Advertisments