Skip to content

Instantly share code, notes, and snippets.

@FooBarWidget
Created July 18, 2013 13:01
Show Gist options
  • Save FooBarWidget/6029104 to your computer and use it in GitHub Desktop.
Save FooBarWidget/6029104 to your computer and use it in GitHub Desktop.
<script src="http://handsontable.com/lib/jquery.min.js"></script>
<script src="http://handsontable.com/dist/jquery.handsontable.full.js"></script>
<link rel="stylesheet" media="screen" href="http://handsontable.com/dist/jquery.handsontable.full.css">
<div id="data_table" style="overflow: visible;" class="handsontable"></div>
<script>
$(document).ready(function() {
function createBigData() {
var rows = []
, i
, j;
for (i = 0; i < 100; i++) {
var row = [];
for (j = 0; j < 6; j++) {
row.push(Handsontable.helper.spreadsheetColumnLabel(j) + i);
}
rows.push(row);
}
return rows;
}
$("#data_table").handsontable({
data: createBigData(),
colWidths: [55, 80, 80, 80, 80, 80, 80], //can also be a number or a function
rowHeaders: true,
colHeaders: true,
minSpareRows: 1,
stretchH: 'all',
width: 400,
height: 300
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment