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
close icon

PivotGrid SerializedXmlString and DeserializeXmlString

Hello,

We use control PivotGridControl in WPF and we want to use the methods string SerializedXmlString() and void DeserializeXmlString(string xmlString) also on web in javascript. Is there implemented the similar solution to this? If so, please provide us the example.

Thanks a lot.

Regards,
Martin Rasovsky



1 Reply

SP Sastha Prathap Selvamoorthy Syncfusion Team July 3, 2017 01:02 PM UTC

Hi Martin, 
 
We think that your requirement is related to serialize PivotGrid control properties to XML format and deserialize it. If so, we are sorry, we don’t have support to serialize/deserialize the control to XML format. Meanwhile, you can save the report by serializing and load it by de-serializing using “JavaScriptSerializer” at service. Please find the below conde snippet for your reference and let us know whether it is your actual requirement. 
 
Sample code(C#): 
using System.Web.Script.Serialization; 
 
namespace MVCSampleBrowser 
{ 
    public class OlapGridController : ApiController 
    { 
        //.. 
       JavaScriptSerializer serializer = new JavaScriptSerializer(); 
         
 
        [System.Web.Http.ActionName("Initialize")] 
        [System.Web.Http.HttpPost] 
        public Dictionary<string, object> Initialize(Dictionary<string, object> jsonResult) 
        { 
            //.. 
           var deSeriazedReport = serializer.Deserialize<dynamic>(temp["PivotRecords"].ToString()); // deserialize the JSON report 
            var serializedReport = serializer.Serialize(temp["PivotRecords"]); // serialize the JSON report 
            return temp; 
        } 
 
Also, we have provided detailed information for save/load report to render the PivotGrid control in our online document link below. 
 
 
Please let us know, if you have any further assistance. 
 
Regards, 
Sastha Prathap S. 


Loader.
Live Chat Icon For mobile
Up arrow icon