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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to process xml data from server using DataManager and bound to Grid

Platform: ASP.NET MVC |
Control: DataManager


How to process the XML response from server and bound the result to Grid?


Essential Javascript DataManager works well with JSON data, but when comes with xml, we need custom adaptor to achieve this requirement. In the custom adaptor, the processResponse has to be overridden to process the xml response from the server.

In the below code snippet, we have extended processResponse method of the ej.UrlAdaptor and in the extended method, the xml data from the server is converted into JSON array. Now it can bound with grid. In the following code, we have performed simple Xml to Json conversion in the function “ConvertToJSON”, which will parse the simple xml document to json, for complex xml parsing, you can use external libraries.



Now let us see, how to use the above custom adaptor (named xmlAdaptor) in the grid. Render the grid and assign the custom adaptor to the grid datasource in the grid Load event.

Grid Initialization










Angular 2 with MVC backend




Asp.Net core:



Figure 1. Response from the server as XML


Figure 2. Grid with data from XML source

2X faster development

The ultimate ASP.NET MVC UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile