We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

deserialize XML file to two propertygrid

Hi, I have two PropertyGrid, one display normalMode, another one display stepMode. Both of the mode are stored in a class named Configuration. I use Configuration class to serialize and deserialize into XML file, my problem is that I cannot serialize the values and I cannot deserialize the values as well. Can anyone help to solve it?

And also, I found that if the class level goes to third level, there comes to a problem of serialize and displaying.

For example :

-Class A
--Class B
---Class C
-----Name
-----Age
-----Gender

It is not a problem to display the value of class B in propertyGrid, but when it goes to class C, the column of Name, Age, and Gender display nothing. Serialize and deserialize function would not function as well.

The attachment below is my sample..

Thanks in Advance.

Attachment: WpfApplication2_9eec8b5f.zip

3 Replies

VR Venkateshwaran Ramdoss Syncfusion Team May 11, 2016 12:29 PM UTC

Hi Tho Jun Xiong ,

We have analyzed your sample which you provided in your previous update. In this "NormalMode" and "StepMode" instance was not set to "configuration". So, the file does not get serialized. We have modified the sample by adding below code example in button click event.

configuration.normal_mode = normalMode;
configuration.step_mode = stepMode;

Now, the file get serialized and saved in xml file. Please download the sample from the below link. You can also check the third level by modifying this sample.

Sample: WpfApplication2  

Regards,
Venkateshwaran V.R.


MT Mers Tho May 16, 2016 06:40 AM UTC

Thank you so much! It works well for me. 


VR Venkateshwaran Ramdoss Syncfusion Team May 17, 2016 05:58 AM UTC

Hi Tho Jun Xiong,

We are glad that your problem has been resolved. Please let us know if you need any other assistance.

Regards,
Venkateshwaran V.R.

Loader.
Up arrow icon