I'm using a UserControl to show and edit a specific property in RadPropertyGrid. In the setter of the property I throw a ValidationException if the user has entered some invalid value. The property looks like this:
It the user enters -1 a nice red frame appears around the UserControl in the PropertyGrid cell, but no Validation Tooltip!!!
If I use e. g. a Textbox to display data, there is a red validation Tooltip. How can I achieve this for my custom controls?
I don't like the the approach with a CustomValidationAttribute, because just throwing a ValidationException is much more straightforward...
public int MyProperty{ get { return _MyProperty; } set { if (value == -1) throw new ValidationException("My Validation error message"); ... }}It the user enters -1 a nice red frame appears around the UserControl in the PropertyGrid cell, but no Validation Tooltip!!!
If I use e. g. a Textbox to display data, there is a red validation Tooltip. How can I achieve this for my custom controls?
I don't like the the approach with a CustomValidationAttribute, because just throwing a ValidationException is much more straightforward...