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,
Hello NeuralDeveloper.
Thank you for the provided sample.
I have investigated your scenario and I have asked our engineering staff to examine this further and unfortunately the XamPropertyGrid is not designed to support the functionality that you are looking at.
Please do not hesitate to ask if you have any other questions on this matter.
Thanks for looking into it. I don't think we can expect our users to know they have to collapse and re-expand the tree to see the update though.
Any good ideas for a workaround? If not, I don't think the XamPropertyGrid is going to be a viable solution for us.
After investigating the binding of the ComboBox's ItemsSource to other property's value and doing some research and trying to figure out a workaround, CombBox's ItemsSource binding to other property's value has been determined to be a product idea. You can suggest new product ideas for future versions by emailing ideas@infragistics.com.
Submitting your idea will send it directly to our product management team so that it can be imported into our new ideas community once live: http://ideas.infragistics.com.
Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. You can also link back to this thread for additional details.Thank you in advance to submitting your product idea.
Thanks for investigating. I've submitted the idea via email.