getColumn()
returns an object with attributes of a column
getColumn(colId: string | number): object;
Parameters:
colId: string | number
- the id of a column
Returns:
An object with attributes of a column.
Example
const column = grid.getColumn("b"); // ->
// {width: 100, id: "b", header: Array(1), $cellCss: {…}, type: "string"}
The returned object contains the following set of properties:
{
id: string | number,
width: number,
header: object[],
htmlEnable: boolean,
footer: array,
maxWidth: number,
minWidth: number,
mark: object | function,
resizable: boolean,
type: string,
dateFormat: string,
editorType: string,
options: array,
template: function,
hidden: boolean,
draggable: boolean,
editable: boolean,
sortable: boolean,
adjust: boolean | string,
autoWidth: boolean,
align: string,
tooltip: boolean,
tooltipTemplate: function,
$cellCss: array, // readonly, an array of objects with CSS classes (as key:value pairs) for each cell of a column
$uniqueData: array, // readonly, an array that contains some unique data, can't be redefined
}
You will find the description of these properties here.
Related API: setColumns()
Related article: Working with columns and cells