What I did is just
$('#dataTable').handsontable(
{rows: 2, cols: 1, colHeaders: ['Parameter'], minSpareRows: 1}
);
Why the header is displaying like 1 and a part below?
I was able to quickly reproduce the issue in this fiddle here. Once this was reproduced I realized that your issue probably is forgetting to include the style sheet. I updated and included this missing style sheet and ended up with this fiddle (that works). The style include would look something like:
<link rel="stylesheet" href="http://handsontable.com/dist/jquery.handsontable.full.css">
Of course, you could download the css file and include it from a relative path and that would also work. Hope that puts you on the right track. Best of luck!
Per the comments below - the main issue here could be not that the style isn't included but that it has been overridden. Without getting too much into the weeds of the handson table it appears that there is an actual data table then the editing cells are placed on top of that (via position: absolute
). In order to style the editing cells use the appropriate .ht_clone
classes. In order to style the "static" table, use the .ht_master
class. The following code shows how to do that:
/* hide the static table header */
.ht_master th {
display: none;
}
/* hide the editing for the header ("clone_top") */
.ht_clone_top {
display: none;
}
See this working in a JSFiddle here. Hope that helps!