Skip to content

Commit

Permalink
added height/width constraint to canvas-datagrid
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Germaneri committed Jan 22, 2018
1 parent c654a26 commit 376db8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions demos/datagrid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 2 additions & 0 deletions demos/datagrid/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 376db8f

Please sign in to comment.