Property binding not working in Grouping mode
Hello
I am working with a complicated scenario with propertygrid
I am binding a chart's background property to viewmodel Background property (type of Color)
This field in propertygrid is using my custom control, and I tried to add this line in my view model class:
[Editor("Background", typeof(ColorEditor))]
Then in window load event add this editor to my propertygrid, I get my editor in this field regardless if I add above line or not
CustomEditor colorEditor = new CustomEditor() { HasPropertyType = true, PropertyType = typeof(Color), Editor = new ColorEditor() };
then I do get my editor in this field.
The problem is, in A-Z mode this works fine, but in Grouping mode the custom editors are not working - looks like the value of the property is not bound, string value is empty (ChartTitle field) and my custom combobox drop down selected value is empty - I do get my color combo box though)
Please advise any solution to this, thanks a lot.
SIGN IN To post a reply.
4 Replies
SA
sally an
April 29, 2020 04:44 PM UTC
please see attached screenshots, thanks.
Attachment: propertyGridGrouping_e24fe1c6.zip
Attachment: propertyGridGrouping_e24fe1c6.zip
Also I tried to add [Category("MyCategory")] and [Display(GroupName="MyCategory"] to my properties and grouping is still "Misc" instead of "MyCategory"
Please advise, thanks.
NI
Ninja
Syncfusion Team
April 30, 2020 10:27 AM UTC
Hi Sally,
Thanks for contacting Syncfusion support.
We have checked your query “PropertyGrid properties binded to Chart properties are not working when grouped in Category” and we have created a sample to reproduce the reproduce it, but it works properly when the property of SfChart is binded to properties in ViewModel. Please refer the below sample for same and let us know if we are missing any details. If you can modify the provided Sample or provide an issue replicating sample , it will be a lot helpful for us to proceed further.
Screenshot :
Regards,
Niranjan
PR
Padmini Ramamurthy
Syncfusion Team
May 4, 2020 04:41 AM UTC
From: An, Sally
Sent: Friday, May 1, 2020 11:29 AM
To: Syncfusion Support <[email protected]>
Subject: RE: Syncfusion support community forum 153789, Property binding not working in Grouping mode, has been updated.
Sent: Friday, May 1, 2020 11:29 AM
To: Syncfusion Support <[email protected]>
Subject: RE: Syncfusion support community forum 153789, Property binding not working in Grouping mode, has been updated.
Thank you very much – I found the problem is I need this line as in your code
TargetNullValue = new object()
Yay!
NI
Ninja
Syncfusion Team
May 4, 2020 05:26 AM UTC
Hi Sally,
Thanks for your update.
We are glad to know the reported issue has been resolved at your end. Please let us know if you require further assistance in this query, we will be happy to assist you as always.
Regards,
Niranjan Kumar Gopalan
SIGN IN To post a reply.
- 4 Replies
- 3 Participants
-
SA sally an
- Apr 29, 2020 02:36 PM UTC
- May 4, 2020 05:26 AM UTC