列名から列番号を取得する方法はありますか?
列名しか取得できず、getCellMeta には列番号が必要です。
ありがとう
私の問題を解決するこの関数を作成しました:
function GetColFromName(name)
{
var n_cols = $editorTableContainer.handsontable('countCols');
var i = 1;
for (i=1; i<=n_cols; i++)
{
if (name.toLowerCase() == $editorTableContainer.handsontable('getColHeader', i).toLowerCase()) {
return i;
}
}
return -1; //return -1 if nothing can be found
}