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

Change in Spreadsheet Rows not Showing in UI

Hi! I'm doing something like:

<EJ.Spreadsheet sheets={sheets} />

The problem is that sheets are loaded asynchronously. So when the spreadsheet is first loaded it hasn't any data. When the data arrives the Spreadsheet doesn't change.
I tried to use the refreshSheet and refreshSpreadsheet functions on the componentDidUpdate lifecycle event but it doesn't seem to be doing anything.

What is the preferred way to do this?

3 Replies

SK Shanmugaraja K Syncfusion Team June 9, 2017 11:00 AM UTC

Hi Juan, 

Thanks for using Syncfusion products, 

We have checked your requirement, and we suggest you to use “updateRange” method to achieve your requirement. We have created simple sample with your scenario, in this sample we have rendered Spreadsheet without data and update the data dynamically after two seconds. Please refer the below code example, 


window.dataSource = [ 
                     { "Item Name": "Casual Shoes", Date: "02/14/2014", Time: "11:34:32 AM", Quantity: 10, Price: 20, Amount: 200, Discount: 1, Profit: 10 }, 
            { "Item Name": "T-Shirts", Date: "10/31/2014", Time: "12:01:44 AM", Quantity: 50, Price: 10, Amount: 500, Discount: 9, Profit: 55 } 
$(function () { 
    setTimeout(function () { 
        var xlObj = $("#ejControl_0").data("ejSpreadsheet"), sheetIndex = xlObj.getActiveSheetIndex(); 
        xlObj.updateRange(sheetIndex, { dataSource: window.dataSource, showHeader: true, startCell: "A1" }); 
    }, 2000) 

Also, we have attached the sample with these code example and the same can be downloaded from the below location. 

Please check the attached sample whether this fulfilling your requirement if not, please get back to us with more information so that we can work on this and provide you a better solution quickly. 

Shanmugaraja K 

HE Hernán June 9, 2017 03:15 PM UTC

Thanks for your response. Will close this ticket. 

SK Shanmugaraja K Syncfusion Team June 12, 2017 08:40 AM UTC

Hi Juan, 
Thanks for your update, please get back to us if you need any other assistance. 
Shanmugaraja K  

Live Chat Icon For mobile
Up arrow icon