DisplayName attribute ignored

Posted by Community Admin on 04-Aug-2018 17:11

DisplayName attribute ignored

All Replies

Posted by Community Admin on 10-Aug-2011 00:00

Hi,

Here's the scenario: create an ascx control that you're going to add to the toolbox.
This control has public properties that make it configurable through the back office, for example:

private string myProperty = "";
[Category("My category"), DisplayName("My cool property")]
public string MyProperty
    get return this.myProperty;
    set this.myProperty = value;

However, the "DisplayName" attribute is ignored, and the property will show up as "MyProperty" in the back office.

Posted by Community Admin on 11-Aug-2011 00:00

Hello Thomas,

The code building the UI for editing properties does not take into consideration DisplayName attribute. Alternatively, you could implement a control designer for your control. It allows you to specify the UI for the configuration of the control. This way you can provide fields only for the most important properties. You can also provide a user friendly UI for setting complex properties.
For more details please refer to the following documentation article: Creating the control designer

All the best,
Pepi
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

Posted by Community Admin on 11-Aug-2011 00:00

Hi Pepi,

Does that mean you don't plan to support the DisplayName attribute in future versions?

Thanks.

Posted by Community Admin on 11-Aug-2011 00:00

Hi Thomas,

I logged this as a feature request for future versions of Sitefinity.

Kind regards,
Pepi
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

Posted by Community Admin on 11-Aug-2011 00:00

Hi Pepi,

Could you please give me the PITS URL, so I can follow it?

Thanks.

Posted by Community Admin on 12-Aug-2011 00:00

Hello Thomas,

Here is the PITS url: http://www.telerik.com/support/pits.aspx#/public/sitefinity/7369

Greetings,
Pepi
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

Posted by Community Admin on 12-Aug-2011 00:00

Hi,

I simply wanted to add that it would be interesting if the [Description()] attribute was supported too.

Thanks,

Olivier

This thread is closed