1-888-365-2779
+1-888-365-2779
Try Now
More in this section

User controls

7 posts, 0 answered
  1. Sasa
    Sasa avatar
    17 posts
    Registered:
    24 Aug 2007
    28 May 2008
    Link to this post
    Hi.

    I have a simple user control added to my sitefinity project. Is there a way to control which input controls Sitefinity will user for editiing my control's properties?

    In particular, this control has some string type properties which would only make sense to edit with textarea and Sitefinity shows up plain textbox by default.

    Creating some custom control designer for this kind of control is a bit overkill, so I'm hoping this can be avoided.

    Thanks
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    29 May 2008
    Link to this post
    Hello Sasa,

    Unfortunately, the only way to achieve the required functionality is to implement a control designer for the corresponding control. Sitefinity dynamically generates the controls for editing the properties on the basis of the property type. For the Enum and Bool types a DropDownList is generated. In all other cases Sitefinity displays a TextBox control.

    Here is a reference to a blog post that discusses how to create a control designer for user controls.

    We are sorry for the inconvenience caused.

    All the best,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Sasa
    Sasa avatar
    17 posts
    Registered:
    24 Aug 2007
    29 May 2008
    Link to this post
    Ok, thanks.

    One more thing... I'd like to hook some properties of this control with Sitefinity's dialogs.

    For example:
    This control has properties like ImageUrl and Url. I'd like Sitefinity to show that "Select" button that fires a neat dialog to choose an image or a page.

    I've done this with some other user control, which has a property that plugs into Sitefinity's Lists dialog:

        Guid[] _listIds;  
        [Category("Data")]  
        [TypeConverter("Telerik.Lists.WebControls.ListsIdsConverter, Telerik.Lists")]  
        [WebEditor("Telerik.Lists.WebControls.ListSelector, Telerik.Lists")]  
        public Guid[] ListsIds  
        {  
            get { return _listIds; }  
            set { _listIds = value; }  
        } 


    What should I pass to WebEditor attribute in order to plug into Images/Pages/... dialogs.

    Is there some documentation available for this? Developer manual is, sadly, not of much help.
  4. Sasa
    Sasa avatar
    17 posts
    Registered:
    24 Aug 2007
    29 May 2008
    Link to this post
    Additionally,

    Is there some documentation available about this? Developer manual is, sadly, not of much help.
  5. Monika
    Monika avatar
    7 posts
    Registered:
    18 Oct 2007
    30 May 2008
    Link to this post
    Hi Sasa,
    The ref blog, you provided is not running fine. Can you ref some other document?

    Can we also create checkbox's at the designer of a control, if yes, please let me know the way to do it.
  6. Monika
    Monika avatar
    7 posts
    Registered:
    18 Oct 2007
    30 May 2008
    Link to this post

    Hi Pepi,
    The ref blog, you provided is not running fine. Can you ref some other document?

    Can we also create checkbox's at the designer of a control, if yes, please let me know the way to do it.
  7. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    30 May 2008
    Link to this post
    Hello Sasa,

    Please take a look at the following blog Working with Complex Properties in Public Controls
    This blog post provides information on how to create a property selector and a dialog for it.
    The Developer Manual is currently undergoing a major update and will be released in the following months. We really hope the new version will be more helpful and exhaustive on each Sitefinity topic.


    Hello Monika,

    We apologize for providing an example with some issues. We will provide an update of the example in the beginning of next week.



    Best wishes,
    Sonya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
7 posts, 0 answered