Hi,
I have a XamPropertyGrid looking at an object structure similar to the one below. The top level selected object has a list of filters, which each have a table and field. These table and field properties are both comboboxes, and the items source of the Field is the fields property of the selected table object. The only solution I can find to create the ItemsSource binding on the Field combobox is to create a converter which uses reflection to get the internal ParentItem property from the PropertyGridItem and find the table from there. Doing it like this works, but obviously isn't how I'd want to do it and it means that the binding does not receive the property change notification when the table changes, so I have to collapse and expand the filter in the property grid to get the fields list to update.
Is there a better way to do this?
- Name- Filters |- 0 |- Table |- Field |- Value |- 1 |- Table |- Field |- Value
Many thanks,
Richard
Hello NeuralDeveloper,
Thank you for the provided information. I have taken a look at it and the best way for us to assist you is if you provide a small isolated sample with all the necessary models that we can run and use for debugging locally.
Meanwhile, please do not hesitate to ask if you have any other questions on this matter.
Hi Martin,
Thanks for the reply. I've created a sample for you.
If you create a SubThing and then select a table, you have to collapse and re-expand the SubThing before the fields ComboBox is populated.
Thanks,