i have a handsontable like below
var $container = $("#example1");
$container.handsontable({
data: data1,
rowHeaders:true,
colHeaders: ["Sun","Mon","Tue","Wed","Thr","Fri","Sat"],
cols:13,
minSpareRows: 100
});
<div id="example1" class="dataTable" style="width: 1170px; height: 450px;
overflow:scroll;"></div>
i can access table tr values
var rowList = $("#example1").handsontable("getData");
rowList = $.grep(rowList,function(array,index)
{
// here i can access values from first row
});
I need to access headers "Sun","Mon","Tue","Wed","Thrs","Fri","Sat" How to do this...? ple help ..
Just use:
hotInstance.getColHeader()
Source: https://docs.handsontable.com/pro/5.0.2/Core.html#getColHeader
I edited this:
var rowHeaderList = $("#example1").handsontable("getRowHeader"); //for row headers
var colHeaderList = $("#example1").handsontable("getColHeader"); //for column headers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With