Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <head>
- <title>Handsontable</title>
- <script type="text/javascript" src="lib/jquery.min.js"></script>
- <script type="text/javascript" src="dist/jquery.handsontable.full.js"></script>
- <link type="text/css" rel="stylesheet" href="dist/jquery.handsontable.full.css">
- <meta http-equiv="Content-Type" content="text/html;charset=windows-1252">
- <script type="text/javascript">
- $(document).ready(function() {
- function createBigData() {
- var rows = []
- , i
- , j;
- for (i = 1; i <= 100; i++) {
- var row = [];
- for (j = 0; j < 6; j++) {
- row.push(Handsontable.helper.spreadsheetColumnLabel(j) + i);
- }
- rows.push(row);
- }
- return rows;
- }
- $("#example2").handsontable({
- data: createBigData(),
- colWidths: [55, 47, 47, 47, 47, 47, 47], //can also be a number or a function
- rowHeaders: true,
- colHeaders: true,
- scrollH: 'auto',
- scrollV: 'auto',
- stretchH: 'hybrid', //actually you don't have to declare it because it is default
- minSpareRows: 0,
- contextMenu: true
- });
- });
- </script>
- </head>
- <body>
- <div id="example2" style="width: height: 150px; overflow: auto"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment