addColumn(userColumn, colIndex, orderType);
// Samples
let userColumn = { name: 'area', header: { text: 'area' }, width: 150, type: 'string' };
grid1.addColumn(userColumn, 0, 'before');
//grid1.addColumn(userColumn, 0, 'after');
grid1.setData(grid_data);
removeColumn(colIndex)
// Samples
grid1.removeColumn(0);
grid1.setData(grid_data);
Create Grid.
// Samples
let grid1;
const addColumns = [];
addColumns[0] = { name: 'area', header: { text: 'area' }, width: 150, type: 'string'}
addColumns[1] = { name: 'manager', header: { text: 'manager'}, width: 100, type: 'string'}
addColumns[2] = { text: "header Text 1", children: [ // parent header column
{name: 'amt1', header: { text: 'amt1' }, width: 100, type: 'number'},
{name: 'amt2', header: { text: 'amt2' }, width: 100, type: 'number'}
]}
addColumns[3] = { text: "header Text 2", children: [ // parent header column
{ name: 'amt3', header: { text: 'amt3'}, width: 100, type: 'number'},
{ text: "header Text 3", children: [
{name: 'amt4', header: { text: 'amt4'}, width: 100, type: 'number'},
{name: 'amt5', header: { text: 'amt5'}, width: 100, type: 'number'} ]}
]}
addColumns[4] = {name: 'note', header: { text: 'note'}, width: 100, type: 'string'}
grid1 = new TbsGrid('grid1');
const options = {};
grid1.setGrid(columns, options);
grid1.setData(grid_data);