The properties of string columns are as follows.

  • Properties : name, text, type, editable, visible, align, width, className.
  • TbsGrid uses lowercase letters for property or option key values.
// Examples
let columns = [
    { name: 'area',    header: { text: 'area'   }, width: 150, type: 'string', className: 'tbs-blue' }, // css className
    { name: 'manager', header: { text: 'manager'}, width: 100, type: 'string' },
    { 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' } ]},
    { 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' } ]}
        ]
    },
    {name: 'note', header: { text: 'note'}, width: 100, type: 'string' }
];

name property.

  • This is a property for entering the column name.
  • It is a required property

text property.

  • Specifies the header name of the column.

type property.

  • name property.
  • type value is "string"
  • If there is no type property, the value is "string".

editable property.

  • This is a property that determines whether the column is editable.
  • The default is false.
  • Available values is true or false.

visible property.

  • This is a property that determines whether a column should be visible or not.
  • The default is true.
  • Available values is true or false.

width property.

  • This is a property that specifies the width of the column.
  • The default is true.
  • Available values is number.

className property.

  • This is a property that specifies the style of the column.