how to create new column by index ??
Hi @kunal
You can use alter() method to achieve this goal.
Example Handsontable example - JSFiddle - Code Playground
Does it work for you?
actually… i tried in this way… but im not getting exactly result
hot1.alter(‘insert_col’,indexCol, 1,) when im using this previous column data assign to new column…
hot1.alter(‘insert_col’,parseInt(colIndex), 1,) when im using in this way perfectly exucution
how to give column name ??
In your example you use ‘indexCol’ and then ‘colIndex’, they may differ.
Here I am setting to index to 0 (first column) and it works the same for both scenarios
Demo Handsontable example - JSFiddle - Code Playground
how to give column name ??
Column names are added via colHeaders
array. Example Handsontable example - JSFiddle - Code Playground