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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to map data from server-side with JsonResult.

Thread ID:

Created:

Updated:

Platform:

Replies:

146483 Aug 5,2019 11:40 PM UTC Aug 7,2019 12:40 PM UTC JavaScript - EJ 2 3
loading
Tags: ListView
Peng Xie
Asked On August 5, 2019 11:40 PM UTC

I am trying to create a listview using javascirpt. Also, I am using UrlAdaptor(). To map the data from sever-side. What kind of JsonResult should I return. Please send me back with sample project that contains all necessary tokens, headers. I am using NetCore. RazorPage.


Attachment: Razorpages_9e9260da.zip

Vinoth Kumar Sundara Moorthy [Syncfusion]
Replied On August 6, 2019 08:50 AM UTC

Hi Peng, 
 
Good day to you. 
 
Please refer the below documentation for getting data from server side using urlAdaptor and sample json data format. 
 
Please refer the below documentation to add the custom header with tokens,  
 
For your convenience, we have created a sample based on your requirement and the same can be downloaded from below link, 
 
 
Could you please check the above details and get back to us if you need any further assistance on this? 
 
Regards, 
Vinoth Kumar S 


Peng Xie
Replied On August 6, 2019 04:44 PM UTC

From the document to use URLAdaptor, it says result and count keys are required, but your given example is not providing these special keys. I have issue that the format of response data. Can you please write some dummy data response to demonstrate response format. I created a post method handler. if you could please correct it.

Thanks.
Peng

Vinoth Kumar Sundara Moorthy [Syncfusion]
Replied On August 7, 2019 12:40 PM UTC

Hi Peng, 
  
Good day to you. 
 
Query 1: I tried the way it was suggest in document, but my ListView could not map response data. 
  
We have checked your query and response data was mapping in ListView properly . For your convenience, we have prepared a sample based on documentation and the same can be downloaded from below link, 
 
 
Query 2: How do I parse out those extra properties from JSON object. 
 
We have checked your requirement and if you want use data manager for rendering the ListView items, the returned data will be based on ListView field property values. So, we cannot return any additional property values. 
 
Could you please check the above details and get back to us if you need any further assistance on this? 
  
Regards, 
Vinoth Kumar S 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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
Live Chat Icon