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

ListView doesn't render when using remote data

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

3 Replies

CI Christopher Issac Sunder K Syncfusion Team 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. 


MA Matteo 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.

VK Vinoth Kumar Sundara Moorthy Syncfusion Team 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 

Live Chat Icon For mobile
Up arrow icon