Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1735
xamPropertyGrid: Select value from a dynamic list of options
posted

Hi,

in the xamPropertyGrid I need to set a property value from a list of available values found in a list. I want the selectable values to end up in a combo box in the property grid.

From my initial investigation I find that a way to do this (at least in other property editors) is to use a TypeConverter attribute on my property and implement the TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) method to generate the list of available options. However, when I try this with the xamPropertyGrid I get passed a context of null in this (and related) TypeConverter methods, making it difficult to use anything but a static list of options.

Is there a way to set up a type converter with a proper context for the xamPropertyGrid, or is there an alternative way to get the combo-box experience I need ?

Regards,
Leif

Parents
No Data
Reply
  • 1990
    posted

    Hello Leif,

    Thank you for your post.

    Could you please send me an isolated sample application where I can reproduce your issue. This way I would be able to further investigate this for you and provide you with more detailed information on this matter.

    Looking forward to hearing from you

    Sincerely,

    Horen

    Software Developer

    Infragistics

Children