Completed
Last Updated: 20 Aug 2012 06:08 by ADMIN
ADMIN
Ivan Petrov
Created on: 20 Aug 2012 06:08
Category: PropertyGrid
Type: Bug Report
0
FIX. RadPropertyGrid - The grid calls the properties TypeConverter GetStandardValues... methods with null context.
RadPropertyGrid calls the TypeConverter methods GetStandardValuesSupported and GetStandardValues passing null as parameter when it should pass the property item.
Code to reproduce:

this.radPropertyGrid1.SelectedObject = new SomeClass();

public class SomeClass
{
    [TypeConverter(typeof(CustomValueConverter))]
    public string CustomValue
    {
        get;
        set;
    }
}

public class CustomValueConverter : TypeConverter    
{
    public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
    {
        return true;
    }

    public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
    {
        return base.GetStandardValues(context);
    }
}
0 comments