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.