Try Now
More in this section

Forums / 3.x Pre-release forums (retired) / Creating User Controls

Creating User Controls

2 posts, 0 answered
  1. Jason Grovert
    Jason Grovert avatar
    28 posts
    25 Oct 2005
    08 Feb 2007
    Link to this post
    When we edit a Custom User control that we've added to the project we'd like to be able to determine what kind of control is generated in the Edit view.  In a previous post I noticed that you stated that you try to determine the best control to use based upon the data type of the value to be edited.  However, I've noticed in particular that boolean values are edited using a dropdown list control whereas we'd prefer a checkbox.  We'd also like to be able to use multi-line textboxes in some situations.  Is this type of control going to be available?  Also, in that same posting you mentioned that samples were going to be made available.  What is the timeframe for those to be posted?  Thanks.

  2. Vlad
    Vlad avatar
    498 posts
    15 Jul 2016
    09 Feb 2007
    Link to this post
    Hello Jason,

    Currently the control property view in Sitefinity supports only modal custom property editors. Unfortunately, this is not valid for the Boolean and Enum data types. Further we will provide an ability to use inline property editors, which will replace the default ones (so you will be able to replace dropdown with checkbox or single-line textbox with multi-line textbox for some of the properties).

    The example of using custom property editors is demonstrated in the JobsIntraSite sample site. It can be downloaded from http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-gtktm.aspx with the latest build.

    In the JobsIntraSite sample site, a custom property editor is provided for the CategoryId property of ~/Jobs/JobList.ascx user control:

    public long CategoryId
      return this.categoryId;
      this.categoryId = value;

    The actual property editor is implemented as ~/Jobs/CategoryPicker.ascx user control.
    All property editors should implement IWebUITypeEditor inteface or WebUITypeEditor<T> abstract class.

    We hope this will help for now. We will try to provide more examples and KBs in the future.

    Sincerely yours,
    the telerik team

2 posts, 0 answered