Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid stuck in "Data Loading" when fetchData is called before the first finishes

    SmartClient Version: v9.0p_2013-11-03/PowerEdition
    Browsers: IE 8-10, Chrome 32, probably others

    I have a ListGrid that fetches data from a DataSource based on user interaction with other components. Sometimes the user initiates another fetchData before the previous call to fetchData has completed. Whenever this happens the grid gets stuck in a "Loading Data" state.

    There are no errors that occur on the server side and I can see the data coming back to the client just fine. The fetchData callback method for both fetchData requests also gets called without a problem. But the ListGrid never displays the rows. It just continues showing the "Loading Data" message.

    You can duplicate this behavior by modifying the code in the example:
    http://www.smartclient.com/#databoundFetch

    isc.ListGrid.create({
    ID: "countryList",
    width:500, height:224, alternateRecordStyles:true,
    dataSource: worldDS,
    // display a subset of fields from the datasource
    fields:[
    {name:"countryCode"},
    {name:"countryName"},
    {name:"capital"},
    {name:"continent"}
    ],
    sortFieldNum: 1, // sort by countryName
    dataPageSize: 50,
    drawAheadRatio: 4
    })

    isc.IButton.create({
    left:1, top:240, width:160,
    title:"Fetch Double",
    click: function() {
    countryList.fetchData(
    {continent:'Europe'},
    function(dsResponse, data, dsRequest){
    isc.say('callback 1 '+dsRequest.clientContext.getDataSource().ID);
    },
    {clientContext: countryList}
    );
    setTimeout(function() {
    countryList.fetchData(
    {continent:'Africa'},
    function(dsResponse, data, dsRequest){
    isc.say('callback 2 '+dsRequest.clientContext.getDataSource().ID);
    },
    {clientContext: countryList}
    );
    }, 100);
    }
    })

    Any suggestions on why this might be happening and the best way to prevent the grid from getting stuck in the "Data Loading" state?

    #2
    Please avoid posting duplicates. This issue is already being investigated.

    Comment


      #3
      Sorry, we did not see any updates in the original thread so posted here.

      Comment


        #4
        Right, don't do that, if you want a progress update just post again in the original thread.

        When you post a duplicate, you can cause two people to waste time working in parallel on the same issue.

        Comment

        Working...
        X