diff --git a/demos/datagrid/README.md b/demos/datagrid/README.md index 40743fda1..7ffc6b081 100644 --- a/demos/datagrid/README.md +++ b/demos/datagrid/README.md @@ -34,6 +34,13 @@ var grid = canvasDatagrid({ }); ``` +For large data sets, it's necessary to constrain the size of the grid. + +```js +grid.style.height = '100%'; +grid.style.width = '100%'; +``` + Once the workbook is read and the worksheet is selected, assigning the data variable automatically updates the view: diff --git a/demos/datagrid/index.html b/demos/datagrid/index.html index c2f50e1bc..25d01c193 100644 --- a/demos/datagrid/index.html +++ b/demos/datagrid/index.html @@ -64,6 +64,8 @@ /* update canvas-datagrid */ if(!cDg) cDg = canvasDatagrid({ parentNode:HTMLOUT, data:data }); + cDg.style.height = '100%'; + cDg.style.width = '100%'; cDg.data = data; XPORT.disabled = false;