This is a migrated thread and some comments may be shown as answers.

EditorAttribute with type name (string) rather than System.Type

1 Answer 31 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Guy
Top achievements
Rank 1
Guy asked on 08 Aug 2016, 08:33 PM

The EditorAttribute of the PropertyGrid currently requires the control type to be available for the class defining the attribute. In the original .NET Property Grid, the EditorAttribute supported a constructor with a string which allowed the type to be resolved at runtime rather than compile time. The TypeConverter attribute also has this type name signature available. This is particularly useful when architecting a solution where the model libraries shouldn't reference the views.

The functionality could be added with a simple constructor signature like this:

public EditorAttribute(string editorTypeName)
    this(Type.GetType(editorTypeName)
{
}

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 09 Aug 2016, 03:28 PM
Hello Guy,

Thank you for getting back to us! We always appreciate customers feedback related to our components. For that reason, I have logged your suggestion as a feature request in our PITS System. You may track its progress following this link.

Regards,
Martin Vatev
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
PropertyGrid
Asked by
Guy
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or