The properties of header columns are as follows.

  • Default Properties : name, align, text.
  • If there is a single header, the text of the column property becomes the name of the header.

name property.

  • headerName is not required.

text property.

  • If there is a single header, the text of the column property becomes the text of the header.

align property.

  • The align property determines the horizontal alignment of the header text.
  • The default is center.
  • Property values : left, center, right.
// Examples
let grid1;
grid1 = new TbsGrid('grid1');

let columns = [
      { name : 'combo1', header: { text:'code'     align : 'left'  }, align : 'center'}
    , { name : 'combo2', header: { text:'Sports'   align : 'center'}, align : 'center'}
    , { name : 'combo3', header: { text:'Language' align : 'right' }, align : 'center'}
];
let options = {};
grid1.setGrid(columns, options);
grid1.setData(grid_data);