Hello Customer Support,
I am sorry to ask so many question, but I am still learning about your controls. I came across an issue in my propertygrid demo.
I am still using
- WPF
- MVVM
- Multi lingual (see Bootstrapper.cs line 65)
- Caliburn Micro, although CM does not really seems to work - I will try to create a different approach for that next.
I am planning to try implementing Fluent Validation as well (https://fluentvalidation.net/), but it creating this demo is a stepwise process, so it will follow later.
For now, I have created a custom editor to display a combobox on the PropertyGrid (PG) that holds a reference to multiple addresses. Initially, changing the selection in the address editor did now show any new values in the PG. So I created a method to refresh the PG after the user selects a new address from the list. The address contains a country field. I defined the country in a separate class. I also created a custom editor that displays a combobox on the PG from which users can select a country. When changing the country, the underlying/nested display details of the country class were updated, sometimes, after the first selection change without having to force refresh the PG ( and without me handling the event explicitly). In the SF demo code (see WPF 2020 vol 1 Attribute Support Demo .NetCore -> changing a date will not update date details). Since this was unreliable I wrote a method that refreshes the PG after the selection changes in the Country combobox. This initially failed because I was using the syncfuction ComboBoxAdv in my custom country editor. I created a second version of the country custom editor with a regular combobox and this one works, but it is really slow.
The attached code has both versions of the code and you can switch between them by commenting / uncommenting the indicated code. The initial code version is the one that works.
My questions are
- Why does the application crash when the custom country editor is created with a syncfysion combobox Adv
Look in the SyncFusion\PropertyGrid\CountryEditor.cs (comment out the entire class (the regular combobox version) and uncomment the class at the bottom of this file (the SF comboboxAdv version)).
This will affect which code is run from the ViewModels\PropertyGridViewModel.cs. The editor with the regular combocox will trigger property_ComboBoxSelectionChanged (row 246) and the comboboxAdv version will trigger property_ComboBoxAdvSelectionChanged on row 276.
- Is there a more elegant way to refresh just the values that reflect the change in selection without having to refresh the entire PG? Refreshing the entire PG is slow.
** One option I would like to try: Is there a way to pre-define the entire Syncfusion PG in xaml? With this I mean that I predefine each property in xaml using a x:name declaration. This name would then also be a property in the ViewModel. This way I think I can bind indivual properties between the View and ViewModel using Caliburn Micro. This would allow a single change to display directly without having to refresh the entire PG.
Thanks for any help you may be able to provide.
Kind regards,
Niels
Attachment:
demo_9a26d8fd.7z