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

spreadsheet has loaded

Hello all,

Is there a flag set that tells that the spreadsheet has loaded?

I want to run some code from javascript after the control has loaded.

$(document).ready(function () {



        var grid1 = document.getElementById("spreadsheet1")[0].ej2_instances[0];

4 Replies 1 reply marked as answer

SP Sangeetha Priya Murugan Syncfusion Team December 13, 2022 12:08 PM UTC

We have triggered the created event after the spreadsheet component gets loaded in the DOM. So, you can use created event based on your need.


SW Stephen Welborn December 13, 2022 05:14 PM UTC


I used 

<ejs-spreadsheet id="spreadsheet1">




                <e-spreadsheet-range dataSource="ViewBag.DefaultData"></e-spreadsheet-range>





 var myspreadsheet = new Spreadsheet({

        created: () => {

            var grid2 = document.getElementById("spreadsheet1");

            var grid1 = document.getElementById("spreadsheet1")[0].ej2_instances[0];


     }, '#spreadsheet1');

Uncaught ReferenceError: Spreadsheet is not defined

    at CellDataBinding:86:25

We are using cshtml pages.  Please advise

Marked as answer

SW Stephen Welborn December 13, 2022 06:00 PM UTC

I found it.

ejs-spreadsheet id="spreadsheet1" created="onCreated">

SP Sangeetha Priya Murugan Syncfusion Team December 14, 2022 10:05 AM UTC

Hi Stephen,


We are happy to hear that you have found a solution at your end, and thanks for sharing it with us. Please contact us if you need any other assistance.

Live Chat Icon For mobile
Up arrow icon