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

Editor Attribute

2 Answers 88 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
george
Top achievements
Rank 1
george asked on 21 Mar 2013, 05:03 AM
Hi may I ask which version of the telerik support Editor Attribute
such as

[Editor(typeof(CustomActionEditor), typeof(UITypeEditor))]
public string FirstName {get;set;}

Also I found out the TypeConverter is not supported in WPF propertygrid as well
    [Description("The phone number of the employee in his office.")]
    [Display(Name = "Phone Number", Order = 3, GroupName = "Personal Information")]
    [TypeConverter(typeof(TestTypeConvertor))]
    public string PhoneNum
    {
        get
        {
            return phoneNum;
        }
        set
        {
            if (this.phoneNum != value)
            {
                this.phoneNum = value;
            }
        }
    }
 
public class TestTypeConvertor:TypeConverter
{
    public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
    {
        var i = 0;
        return base.CanConvertTo(context, destinationType);
    }
    public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
    {
        var i = 1;
        return base.CanConvertFrom(context, sourceType);
    }
}


Thanks
George

2 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 25 Mar 2013, 04:42 PM
Hello Geoge,

The support for EditorAttribute is in our current to-do list and we are working on it. As for the TypeConverter, we will investigate the case and see how we can achieve it.  

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
George
Top achievements
Rank 1
answered on 25 Mar 2013, 08:20 PM
thanks
Tags
PropertyGrid
Asked by
george
Top achievements
Rank 1
Answers by
Maya
Telerik team
George
Top achievements
Rank 1
Share this question
or