PDA

View Full Version : [CLOSED] Convert json to XML Gridpanel rows values



matrixwebtech
Sep 01, 2014, 10:12 AM
Hi,

currently I taking grid value from view to controller like bellow,
which return a JSON string.Is there any way to get this value as XML format.


de.Click.ExtraParams.Add(new Parameter
{
Name = "values",
Value = "Ext.encode(#{GridPanel1}.getRowsValues())",
Mode = ParameterMode.Raw
});

Daniil
Sep 01, 2014, 12:52 PM
Hi @matrixwebtech,

This example demonstrates how to get an XmlNode from a submitted GridPanel's data.
http://examples2.ext.net/#/GridPanel/Miscellaneous/Submit_Two_Grids/

matrixwebtech
Sep 01, 2014, 12:59 PM
Thanks for your reply.
but is there any technique to send data to controller as XML format not JSON.

Daniil
Sep 02, 2014, 12:40 PM
Could you, please, clarify why?

Well, I think there is a possibility to convert a JSON object to an XML format via JavaScript. Though, as far as I can remember, there is no such a convert function in Ext.NET or ExtJS. In any way, an XML object is going to be sent to server as a string. This string is supposed to be deserialized on server side. Personally, I would prefer to convert JSON to XML.

matrixwebtech
Sep 04, 2014, 6:37 PM
Hi Daniil Thanks for your reply,
I will go with your suggestion.