ThLoser

Untitled

Feb 28th, 2014
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.29 KB | None | 0 0
  1. <!DOCTYPE HTML>
  2.     <html>
  3.         <head>
  4.             <title>Handsontable</title>
  5.             <script type="text/javascript" src="lib/jquery.min.js"></script>
  6.             <script type="text/javascript" src="dist/jquery.handsontable.full.js"></script>
  7.             <link type="text/css" rel="stylesheet" href="dist/jquery.handsontable.full.css">
  8.             <meta http-equiv="Content-Type" content="text/html;charset=windows-1252">
  9.             <script type="text/javascript">
  10.             $(document).ready(function() {
  11.                  function createBigData() {
  12.         var rows = []
  13.       , i
  14.       , j;
  15.  
  16.         for (i = 1; i <= 100; i++) {
  17.            var row = [];
  18.            for (j = 0; j < 6; j++) {
  19.                row.push(Handsontable.helper.spreadsheetColumnLabel(j) + i);
  20.            }
  21.            rows.push(row);
  22.        }
  23.  
  24.        return rows;
  25.    }
  26.  
  27.                 $("#example2").handsontable({
  28.                     data: createBigData(),
  29.  colWidths: [55, 47, 47, 47, 47, 47, 47], //can also be a number or a function
  30.  rowHeaders: true,
  31.  colHeaders: true,
  32.  scrollH: 'auto',
  33.  scrollV: 'auto',
  34.  stretchH: 'hybrid', //actually you don't have to declare it because it is default
  35.  minSpareRows: 0,
  36.  contextMenu: true
  37.                 });
  38.              });
  39.              </script>
  40.         </head>
  41.         <body>
  42.         <div id="example2" style="width: height: 150px; overflow: auto"></div>
  43.        
  44.        
  45.         </body>
  46.     </html>
Advertisement
Add Comment
Please, Sign In to add comment