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
Essential JS2

Syncfusion jQuery based widgets are no longer in active development. Switch to our pure JavaScript based next generation Essential JS 2 library.

Javascript Errors After Formatting Any Cell After 22

Thread ID:

Created:

Updated:

Platform:

Replies:

141750 Jan 2,2019 05:47 PM UTC Jan 3,2019 03:34 PM UTC jQuery 1
loading
Tags: ejSpreadSheet
Blake Hoffman
Asked On January 2, 2019 05:47 PM UTC

I have been using the ejSpreadsheet and everything runs fine, until I try to format any cells after cell 22.  When using the XLResize.fitWidth() function and the setBorder() function, I get javascript errors.  The code used to fit Width is below:
for (var i  =  0; i  <  jobCount + 16;  i++) { this.XLResize.fitWidth([i]) };

When i is greater than 22, the following error happens - "Cannot read property 'offsetWidth' of undefined"

When I try to set border on a cell greater than 22, this error happens - ""Cannot read property 'className' of undefined"

Is this a known problem?  I was also wondering what I can do to work around this/fix this.

Thank you for your assistance.  

Silambarasan I [Syncfusion]
Replied On January 3, 2019 03:34 PM UTC

Hi Blake, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your reported issue and we would like to let you know that Spreadsheet will render initially with 20 rows (default row count) and 21 columns (default column count).  
 
The cause of this is due to when applying the border and fitWidth for range more than initial column count. However, we would like to suggest you to set the ‘’colCount” sheet property in Spreadsheet to apply formatting for range more than initial column count.  
 
In the below sample we are applying the border and fit width for 50 rows and 50 columns. Please check the below code snippet. 
 
 
$("#Spreadsheet").ejSpreadsheet({ 
    sheets: [{ 
        dataSource: dataSource, rowCount: 50, colCount: 50 
    }], 
    loadComplete: "onLoadComplete" 
}); 
 
function onLoadComplete(args) { 
    if (!this.isImport) { 
        var excelObj = $("#Spreadsheet").data("ejSpreadsheet"); 
        for (var i = 0; i < 50; i++) { 
            this.XLResize.fitWidth([i]); 
        }; 
        this.setBorder({ style: "solid", type: "outside", color: "#000000" }, "B1:AZ50"); 
    } 
} 
 
 
Could you please check the above sample and get back to us with more information if you need any further assistance on this? 
 
Regards, 
Silambarasan 


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