More in this section

Forums / Bugs & Issues / User Control Properties Missing

User Control Properties Missing

6 posts, 0 answered
  1. JGarland
    JGarland avatar
    30 posts
    Registered:
    11 Nov 2006
    19 Apr 2011
    Link to this post
    I have some user controls I created using Sitefinity 3.7 and have custom properies which worked under 3.7.

    In 4.0 when I edit the control's properties, I do not see any of the customer properties visible.

    In the example below the property MaximumDynamicDisplayLevels does not show on the properties page.

    Here is my code:

    Partial Class UserControls_ETG_ETGMenu
        Inherits System.Web.UI.UserControl

        Protected Sub Menu1_MenuItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemDataBound

        e.Item.Text = UCase(e.Item.Text)

            'Select the current page.
            If LCase(ResolveUrl(e.Item.NavigateUrl)) = LCase(Request.Url.AbsolutePath) Then
                e.Item.Selectable = True
                e.Item.Selected = True
            End If

        End Sub

        <System.ComponentModel.Browsable(True)> _
        <System.ComponentModel.Category("Behavior")> _
        Public Property MaximumDynamicDisplayLevels() As Integer

            Get

                'Get property.
                Return Menu1.MaximumDynamicDisplayLevels

            End Get

            Set(ByVal value As Integer)

                'Set property.
                Menu1.MaximumDynamicDisplayLevels = value

            End Set

        End Property

    End Class
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    21 Apr 2011
    Link to this post
    Hi JGarland,

    I am not able to replicate this issue with MaximumDynamicDisplayLevels property from your code and testing under the latest official release of Sitefinity.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

  3. JGarland
    JGarland avatar
    30 posts
    Registered:
    11 Nov 2006
    21 Apr 2011
    Link to this post
    I have tested this on my development workstation and a production server. The custom properties do not show up.

    I am running Sitefinity 4.0.1210.0

    Attached is a screen shot of the properties window.
  4. JGarland
    JGarland avatar
    30 posts
    Registered:
    11 Nov 2006
    21 Apr 2011
    Link to this post
    Just installed 4.1.1339.0 and custom properties are still missing
  5. JGarland
    JGarland avatar
    30 posts
    Registered:
    11 Nov 2006
    21 Apr 2011
    Link to this post
    Ok mystery solved, sorta.

    The custom properties can only be of type string. Integers or anything else do not work.

    I will go ahead and change all my custom properties to string for the time being.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Apr 2011
    Link to this post
    Hi JGarland,

    You can show properties of different type, but they are represented only with a text box in the advanced tab of the control designer. I created a property of type ViewStateMode (enum) and it is correctly shown. Please take a look at attached video.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

6 posts, 0 answered