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

ListView doesn't render when using remote data

Thread ID:





146206 Jul 25,2019 02:42 PM UTC Jul 30,2019 09:48 AM UTC React - EJ 2 3
Tags: ListView
Asked On July 25, 2019 02:42 PM UTC

I am trying to create a List of items, when I use a local array it does work, when transitioning to remote dataSource I cannot make it render.

        this.Temp = [
            {idd: 1, textt: "TEST1"},
            {idd: 2, textt: "TEST2"},
            {idd: 3, textt: "TEST3"},
            {idd: 4, textt: "TEST4"},

        this.AuditData = new DataManager({ url: this.AuditAPI, adaptor: new ODataV4Adaptor(), headers: [this.header] });
        this.AuditQueryOld = new Query().where("AssemblyId", "equal", props.AssemblyId).select(['AuditAuditId', 'AuditSequenceResourcesItalianText']);

                    <div className="col-xs-12">
                        <ListViewComponent headerTitle="Remote" showHeader={true} dataSource={this.AuditData} query={this.AuditQueryOld} fields={{ id: "AuditAuditId", text: "AuditSequenceResourcesItalianText" }} />

                    <div className="col-xs-12">
                        <ListViewComponent headerTitle="Local" showHeader={true} dataSource={this.Temp} fields={{id: "idd", text: "textt"}} />

The Datamanager fetches the correct data.
  1. @odata.context"http://XXXX:8280/api/$metadata#Audits(AuditAuditId,AuditSequenceResourcesItalianText)"
  2. @odata.count3
  3. value[{AuditAuditId: 13180,…}, {AuditAuditId: 13181,…}, {AuditAuditId: 13182,…}]
    1. 0{AuditAuditId: 13180,…}
      1. AuditAuditId13180
      2. AuditSequenceResourcesItalianText"Rack IPG Messa in servizio Versione 01.00 "
    2. 1{AuditAuditId: 13181,…}
      1. AuditAuditId13181
      2. AuditSequenceResourcesItalianText"Rack AV2000 Messa in servizio Versione 01.00 CP "
    3. 2{AuditAuditId: 13182,…}
      1. AuditAuditId13182
      2. AuditSequenceResourcesItalianText"Rack AV2000 Messa in servizio Versione 01.00

Attachment: temp_84a46034.zip

Christopher Issac Sunder K [Syncfusion]
Replied On July 26, 2019 02:20 PM UTC

Hi Matteo, 

Greetings from Syncfusion support. 

We have analyzed your requirement. When you want to bind a remote data to listview component you need to use “crossDomain” in DataManager instead of “adapter”. 

Please refer the below code snippet 
private data = new DataManager({ url: '//js.syncfusion.com/ejServices/Wcf/Northwind.svc/', crossDomain: true }); 

We have created a sample for remote databinding concept in listview component. 

Please refer the sample link given below. 

Let us know if you have any concerns. 


Replied On July 29, 2019 06:46 AM UTC

Adding Crossdomain does not solve the issue.

I want to use the OdataV4Adaptor, not the default.

I am sorry but your response makes no sense, you just copied the example from the documentation and noted a difference with my code.

Vinoth Kumar Sundara Moorthy [Syncfusion]
Replied On July 30, 2019 09:48 AM UTC

Hi Matteo, 
Good day to you. 
We have tried to reproduce your issue using ODataV4Adaptor. Unfortunately, we are able to reproduce it. For your convenience, I have attached the below sample for your requirement. 
Could you please check above sample and get back to us with sample data URL link or issue reproducible sample if you still face the issue? 
Vinoth Kumar S 


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