Forum  Commercial Foru...  Commercial Foru...  Property Sheet Error?
Previous Previous
 
Next Next
New Post 12/15/2010 12:09 PM
  jharmon@blinfo.com
853 posts
1st Level Poster




Property Sheet Error? 

I have a custom control where I have added some new properties to a textbox.  However, if I try to set the properties using the property sheet in Visual Studio I get an error that says: Property Value is not valid.  Details: Object reference not set to an instance of an object.

If I go and change the property manually then I am not able to open the designer and get the following error:

at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

Can someone enlighten me as to why I would get this error?


Thanks, Joe
 
New Post 12/15/2010 3:17 PM
  palli
14304 posts
1st Level Poster




Re: Property Sheet Error? 

Hi Joe,

Can you post more details on how exactly you declare your properties, maybe an example of such a property declaration that you have added to a control ?

Testing here, then simple property declaration on a custom control do not give me any such errors:

 

    Private _CustomText As String
    Public Property CustomText() As String
        Get
            Return _CustomText
        End Get
        Set(ByVal value As String)
            _CustomText = value
        End Set
    End Property
 
    Private _CustomInt As Integer
    Public Property CustomInt() As Integer
        Get
            Return _CustomInt
        End Get
        Set(ByVal value As Integer)
            _CustomInt = value
        End Set
    End Property

Palli


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
New Post 12/16/2010 2:16 PM
  jharmon@blinfo.com
853 posts
1st Level Poster




Re: Property Sheet Error? 

I found out the problem.  I was trying to set the validatorType within my property set routines and I had to wrap it with a if (!DesignMode).  Thanks anyways...


Thanks, Joe
 
New Post 12/16/2010 2:53 PM
  palli
14304 posts
1st Level Poster




Re: Property Sheet Error? 

Hi Joe,

Glad you found the cause and thanks for the confirmation and sharing,

Palli

 


Páll Björnsson - Visual WebGui support team - Email: support@visualwebgui.com
 
Previous Previous
 
Next Next
  Forum  Commercial Foru...  Commercial Foru...  Property Sheet Error?
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS