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

Forums / Developing with Sitefinity / Access ControlDesigner Property

Access ControlDesigner Property

2 posts, 0 answered
  1. Siddesh Kapadi
    Siddesh Kapadi avatar
    239 posts
    Registered:
    09 Oct 2009
    07 Jan 2012
    Link to this post
    Hi Team Telerik,

    I have implemented custom control with ControlDesigner. Below is the declaration of it

    [ControlDesigner(typeof(FieldsWidgetDesigner)]
    public partial class MyCustomControl : System.Web.UI.UserControl
    {
    //Added my code here.
    }

    It works beautifully. Now my question is:

    Inside the ControlDesigner Class: FieldsWidgetDesigner I have a property.

    I need to access this property inside my custom Class: MyCustomControl 

    Please let me know how this can be acheived.

    Regards,
    Siddesh Kapadi

     
  2. Svetoslav Petsov
    Svetoslav Petsov avatar
    456 posts
    Registered:
    24 Sep 2012
    11 Jan 2012
    Link to this post
    Hello,

     This should be done the other way round. All the properties that you want to have in your control, should be exposed in the control's class. Then, in the designer, you can set these properties, from the client-side script, by calling the this._propertyEditor.get_control()  method that returns the control class with all of its properties and lets you set their values. 
    Here's an article that can explains in detail how to work with control designers:
    http://www.sitefinity.com/blogs/joshmorales/posts/11-09-20/creating_advanced_sitefinity_4_widget_control_designers.aspx 
    Let me know if you need further help with this.


    Kind regards,
    Svetoslav Petsov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered