I was recently very surprised when I noticed that in the latest iteration of Google Spreadsheets they are rendering the spreadsheet grid using a canvas
tag, whereas in the past they used the tried and true <table><tr><td>
to render the grid.
In the previous version only a fraction of actual rows are rendered at any one point in time using a virtual rows technique (similar to what's done in slickgrid). Which gives pretty good performance (slickgrid has a demo of 500,000 rows).
My Questions:
canvas
able to be so much more effective than the virtual DOM elements technique?Thanks.
The ideal solution would be to modify the HTML code so that the entire grid element is wrapped in an <a> tag. This is valid, semantic HTML and would not require any further coding to make the grid element clickable.
You can embed HTML in the Rich Content Editor. When creating custom HTML coding in Canvas, you may discover that certain HTML codes do not work upon saving.
For people looking for another easy-to-use alternative that is quite similar to Hypergrid, take a look at: Canvas Datagrid
It is usable with only a few lines of code:
var container = document.getElementById('container')
var dataGrid = canvasDatagrid({
parentNode: container
})
dataGrid.data = [
{col1: 'row 1 column 1', col2: 'row 1 column 2', col3: 'row 1 column 3'},
{col1: 'row 2 column 1', col2: 'row 2 column 2', col3: 'row 2 column 3'}
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With