I am binding my RadPropertyGrid to an object that contains a "property bag" - in other words, the object has a collection of child objects that represent the properties displayed in the property grid. This collection is populated from a database so there is no knowledge at all in the application of the names, values, etc. for any of the 'properties'.
The object subclasses CustomTypeDescriptor, overrides GetProperties and returns a custom PropertyDescriptor for each of the items in the collection. All of this works great except for cases where I need the user to select from a list of options. Note that the list of options is NOT an enumeration but a collection of name/value pairs obtained from the database.
So the question is how to display a combobox in the property grid that is bound dynamically?
I've seen the other forum posts and examples using the LookupPropertyDefinition but they all use static references in the XAML to the property names and use static resources as the ItemsSource. Neither of these are possible in my case as I won't know which 'properties' have options until runtime as the list is configurable in the database. In addition, the list of choices is pulled out of the database so it will be different for each 'property'.
In previous incarnations of our application, we've been able to simply define a custom TypeConverter for the property, override the GetStandardValuesSupported method to return true then override GetStandardValues which would return the list of choices. As I have learned from other posts, this is not supported in the RadPropertyGrid. So what is?
Your help is greatly appreciated as this is a significant enough feature and enough time has been spent trying to get it working that it could lead us to another vendor that is capable of supporting this need.
The object subclasses CustomTypeDescriptor, overrides GetProperties and returns a custom PropertyDescriptor for each of the items in the collection. All of this works great except for cases where I need the user to select from a list of options. Note that the list of options is NOT an enumeration but a collection of name/value pairs obtained from the database.
So the question is how to display a combobox in the property grid that is bound dynamically?
I've seen the other forum posts and examples using the LookupPropertyDefinition but they all use static references in the XAML to the property names and use static resources as the ItemsSource. Neither of these are possible in my case as I won't know which 'properties' have options until runtime as the list is configurable in the database. In addition, the list of choices is pulled out of the database so it will be different for each 'property'.
In previous incarnations of our application, we've been able to simply define a custom TypeConverter for the property, override the GetStandardValuesSupported method to return true then override GetStandardValues which would return the list of choices. As I have learned from other posts, this is not supported in the RadPropertyGrid. So what is?
Your help is greatly appreciated as this is a significant enough feature and enough time has been spent trying to get it working that it could lead us to another vendor that is capable of supporting this need.