BoldDeskWe are launching BoldDesk on Product Hunt soon. Learn more & follow us.
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 () {
alert("Document");
var grid1 = document.getElementById("spreadsheet1")[0].ej2_instances[0];
}
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.
https://ej2.syncfusion.com/javascript/documentation/api/spreadsheet#created
Hello,
I used
<ejs-spreadsheet id="spreadsheet1">
<e-spreadsheet-sheets>
<e-spreadsheet-sheet>
<e-spreadsheet-ranges>
<e-spreadsheet-range dataSource="ViewBag.DefaultData"></e-spreadsheet-range>
</e-spreadsheet-ranges>
</e-spreadsheet-sheet>
</e-spreadsheet-sheets>
</ejs-spreadsheet>
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
I found it.
ejs-spreadsheet id="spreadsheet1" created="onCreated">
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.