I have a custom object type which has to be editable in PropertyGrid:
public class CustomObjectType
{
public string Name { get; set; }
public override void SetValue(object component, object value)
{
//((CustomObjectType)component)[prop.Name] = value;
CustomObjectType cot = (CustomObjectType)component;
CustomProperty cp = cot.Properties.FirstOrDefault(r => r.Name.Equals(prop.Name));
if (cp == null) return;
cp.DefaultValue = value;
}