
Hi,
I have a problem using the PropertyGrid and a ComboBox with the IDataErrorInfo.
In your example ActiproSoftware.ProductSamples.PropertyGridSamples.QuickStart.CategoryEditors, I implement the IDataErrorInfo on the CommonObject like following:
public string Error { get; private set; }
public string this[string columnName]
{
get
{
return GetErrorCore(columnName);
}
}
private string GetErrorCore(string columnName)
{
Error = GetError(columnName);
return Error;
}
protected virtual string GetError(string columnName)
{
return null;
}
If I set a TracePoint on the get of the this[string columnName] property, I see that this accessor is called 5 times when I modified a property of a combobox (ie:FontStyle) and one time if I modify the property FontSize. So my implementation of the GetError is quite complicated.
How can I deal with that behavior ? Did I do something wrong or is that a bug ?
Thanks a lot for your help
Sylvain