More in this section

Forums / Developing with Sitefinity / Sitefinity User Controls Property Order

Sitefinity User Controls Property Order

5 posts, 0 answered
  1. Dale Palmer
    Dale Palmer avatar
    20 posts
    Registered:
    12 May 2008
    17 Mar 2009
    Link to this post
    Is it possible to order the properties for a sitefinity user control?

    for example i am writing a google maps plugin with the following properties


        [Browsable(false)]  
        public override bool EnableTheming  
        {  
            get  
            {  
                return base.EnableTheming;  
            }  
            set  
            {  
                base.EnableTheming = value;  
            }  
        }  
        [Browsable(false)]  
        public override bool EnableViewState  
        {  
            get  
            {  
                return base.EnableViewState;  
            }  
            set  
            {  
                base.EnableViewState = value;  
            }  
        }  
        [Browsable(false)]  
        public override bool Visible  
        {  
            get  
            {  
                return base.Visible;  
            }  
            set  
            {  
                base.Visible = value;  
            }  
        }  
     
     
        [Category("Address Details")]  
        public string Name  
        {  
            get  
            {  
                return sName;  
            }  
            set  
            {  
                sName = value;  
            }  
        }  
        [Category("Address Details")]  
        public string AddressLine1  
        {  
            get  
            {  
                return sAddressLine1;  
            }  
            set  
            {  
                sAddressLine1 = value;  
            }  
        }  
        [Category("Address Details")]  
        public string AddressLine2  
        {  
            get  
            {  
                return sAddressLine2;  
            }  
            set  
            {  
                sAddressLine2 = value;  
            }  
        }  
        [Category("Address Details")]  
        public string Town  
        {  
            get  
            {  
                return sTown;  
            }  
            set  
            {  
                sTown = value;  
            }  
        }  
        [Category("Address Details")]  
        public string Postcode  
        {  
            get  
            {  
                return sPostcode;  
            }  
            set  
            {  
                sPostcode = value;  
            }  
        }  
        [Category("Address Details")]  
        public string Email  
        {  
            get  
            {  
                return sEmail;  
            }  
            set  
            {  
                sEmail = value;  
            }  
        }  
        [Category("Address Details")]  
        public string Telephone  
        {  
            get  
            {  
                return sTelephone;  
            }  
            set  
            {  
                sTelephone = value;  
            }  
        } 

    - Name
    - AddressLine1
    - AddressLine2
    - Town
    - Postcode
    - Email
    - Telephone

    But when i log into sitefinity and add my user control to the page, i come to edit the properties for that control but the properties appear in the following order:

    - AddressLine2
    - AddressLine1
    - Email
    - Town
    - Postcode
    - Telephone
    - Name

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    17 Mar 2009
    Link to this post
    Hi Dale Palmer,

    I regret to inform you that user control properties cannot be sorted. You can add them to categories, but they will not be sorted again. We have planned to provide sorting expression for user control properties from Sitefinity 4.0.

    If someone has found any hack, please feel free to share it with other community members.

    Kind regards,
    Ivan Dimitrov
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Gabe Sumner
    Gabe Sumner avatar
    440 posts
    Registered:
    09 Sep 2007
    17 Mar 2009
    Link to this post
    It's a bit more work, but Control Designers are wonderful and allow you to completely customize the admin UI interface for your User Controls:

    http://www.sitefinitywatch.com/blog/09-02-14/Introduction_to_Sitefinity_Control_Designers.aspx

    I'm guilty of neglecting this feature as well, but in all honesty, I believe all controls should have a Control Designer.

    Gabe Sumner
    http://www.sitefinitywatch.com/
  4. Richard Murphy
    Richard Murphy avatar
    6 posts
    Registered:
    23 Mar 2006
    26 Mar 2009
    Link to this post
    This is basic usability stuff. It really needs fixing. Why not at least order them alphabetically?
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    26 Mar 2009
    Link to this post
    Hello Richard Murphy,

    The functionality for managing advanced tab properties will be available from Sitefinity 4.0. We fully agree with you. We started building the new API for 4.0 and developing a new features where such limitations will not exsist.


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Register for webinar
5 posts, 0 answered