Access ControlDesigner Property

Posted by Community Admin on 04-Aug-2018 09:04

Access ControlDesigner Property

All Replies

Posted by Community Admin on 07-Jan-2012 00:00

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

 

Posted by Community Admin on 11-Jan-2012 00:00

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

This thread is closed