Hi,
I encountered the following when using the FlagEnumEditor in my RadPropertyGrid:
If you unset the last remaining flag using the FlagEnumEditor (unchecking the last checked checkbox, NOT setting the None Flag (value zero) ), a binding error occurs and the data is not set correctly.
Error Message:
System.Windows.Data Error: 7 : ConvertBack cannot convert value '' (type 'String'). BindingExpression:Path=Flags; DataItem='MyClass' (HashCode=49455573); target element is 'FlagEnumEditor' (Name=''); target property is 'Value' (type 'String') FormatException:'System.FormatException: is not a valid value for MyFlags. ---> System.ArgumentException: Must specify valid information for parsing in the string.
... where MyClass is the type of the data context (Item of RadPropertyGrid) and MyFlags is the flags enum type.
If you just use the None Flag, everything works fine.
Suggested behavior: if the string value for converting back is empty, the flag enum should be set to zero.
I was going to create an Issue for this in the PITS, but there was no category for RadPropertyGrid...
Kind Regards
I encountered the following when using the FlagEnumEditor in my RadPropertyGrid:
If you unset the last remaining flag using the FlagEnumEditor (unchecking the last checked checkbox, NOT setting the None Flag (value zero) ), a binding error occurs and the data is not set correctly.
Error Message:
System.Windows.Data Error: 7 : ConvertBack cannot convert value '' (type 'String'). BindingExpression:Path=Flags; DataItem='MyClass' (HashCode=49455573); target element is 'FlagEnumEditor' (Name=''); target property is 'Value' (type 'String') FormatException:'System.FormatException: is not a valid value for MyFlags. ---> System.ArgumentException: Must specify valid information for parsing in the string.
... where MyClass is the type of the data context (Item of RadPropertyGrid) and MyFlags is the flags enum type.
If you just use the None Flag, everything works fine.
Suggested behavior: if the string value for converting back is empty, the flag enum should be set to zero.
I was going to create an Issue for this in the PITS, but there was no category for RadPropertyGrid...
Kind Regards