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
375
xamPropertyGrid add dropdown list
posted

Hi,

sorry if this is a stupid question, but I found nothing how to achieve this:

In a xamPropertyGrid, I want to have a (dynamically filled) dropdown list, where the user can select f.ex. a person's country.

The list should display the countries full names, but when selected, the country's short name should be assigned to the bound property.

See attached sample.

Thanks for your help!

XamPropertyGrid.zip

Parents
No Data
Reply
  • 33490
    Verified Answer
    Offline posted

    Hello Florian,

    I have been investigating into the behavior you are looking to achieve to place a drop-down within a XamPropertyGrid and I would recommend utilizing an EditorDefinition for this with an EditTemplate for one of your properties. You can read our documentation about this here.

    If you have a view model where the collection to populate the drop-down exists as a property, you can populate your drop-down dynamically that way.

    I am attaching a modified version of the sample project you sent to demonstrate placement of a drop-down within a cell in the XamPropertyGrid. I hope this helps you.

    Please let me know if you have any other questions or concerns on this matter.

    2843.XamPropertyGrid.zip

Children