Products

Back to Examples

Data Grid Lazy loading

Jspreadsheet Pro implements a smart virtual DOM management that brings a greater performance. In the example below, the spreadsheet handles 2 million cells (200K x 10 columns).

<html>
<script src="https://jspreadsheet.com/v7/jspreadsheet.js"></script>
<link rel="stylesheet" href="https://jspreadsheet.com/v7/jspreadsheet.css" type="text/css" />
<script src="https://jsuites.net/v5/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v5/jsuites.css" type="text/css" />

<div id="spreadsheet"></div>

<script>
let data = [];

for (let j = 0; j < 500000; j++) {
    data[j] = [];
    for (let i = 0; i < 10; i++) {
        data[j][i] = jspreadsheet.helpers.getColumnNameFromCoords(i, j);
    }
}

jspreadsheet(document.getElementById('spreadsheet'), {
    data: data,
    tableOverflow: true,
    lazyLoading: true,
    lazyColumns: true,
    onlazyloading: function(el, addedRows, removedRows) {
        // Related events
    },
    license: 'Mjk2ZDBhMjI4ZDllZjk2MzdkYWQ0MmIxNzY3NWNkYzVhMzk4YzgxMjRlOTM3YThiMjAyZDdlMTMwOGU5NTFhNjVlZmVhYTc4MWZiYzljYmY1YmU5Zjc1OTllYjM4ZjI2MTdlYWQwODJmZWFmOTM3NzZlMzliYzllNGI1ZWI3MDMsZXlKamJHbGxiblJKWkNJNklpSXNJbTVoYldVaU9pSktjM0J5WldGa2MyaGxaWFFpTENKa1lYUmxJam94TnpNME9UUTFNRFV4TENKa2IyMWhhVzRpT2xzaWFuTndjbVZoWkhOb1pXVjBMbU52YlNJc0ltTnZaR1Z6WVc1a1ltOTRMbWx2SWl3aWFuTm9aV3hzTG01bGRDSXNJbU56WWk1aGNIQWlMQ0ozWldJaUxDSnNiMk5oYkdodmMzUWlYU3dpY0d4aGJpSTZJak0wSWl3aWMyTnZjR1VpT2xzaWRqY2lMQ0oyT0NJc0luWTVJaXdpZGpFd0lpd2lkakV4SWl3aVkyaGhjblJ6SWl3aVptOXliWE1pTENKbWIzSnRkV3hoSWl3aWNHRnljMlZ5SWl3aWNtVnVaR1Z5SWl3aVkyOXRiV1Z1ZEhNaUxDSnBiWEJ2Y25SbGNpSXNJbUpoY2lJc0luWmhiR2xrWVhScGIyNXpJaXdpYzJWaGNtTm9JaXdpY0hKcGJuUWlMQ0p6YUdWbGRITWlMQ0pqYkdsbGJuUWlMQ0p6WlhKMlpYSWlMQ0p6YUdGd1pYTWlYU3dpWkdWdGJ5STZkSEoxWlgwPQ=='
});
</script>
</html>