Documentation

Grid columns

Set of columns is defined by parameter COLUMNS, or HEADERS in compatibility mode with previous deprecated grid version. Grid column is an array including set of required and additional parameters.

Required parameters

ParameterTypeDescription
idstring / booleanColumn identifier.
namestringColumn title, displayed to user.

$column = [
	'id' => 'column_id',
	'name' => 'Column title',
];

Additional parameters

ParameterTypeDescription
defaultbooleanDefines if a default column must be displayed in grid by default. Columns are not displayed by default.
sortstringField identifier used to perform sorting.
first_orderstringFirst column sorting direction. Available values: 'asc' or 'desc'.
shownamebooleanAllows hiding column title. Prints title by default.
widthintColumn width in pixelspx.
alignstringText alignment in column cells. Possible values:
  • left
  • center
  • justify
  • right
classstringCustom CSS-class for column title.
editablearrayDefines parameters for inline editing. If not defined, inline editing is disabled for column cells. Array editable must contain a required parameter TYPE, that accepts the constant as the value from \Bitrix\Main\Grid\Editor\Types.
prevent_defaultbooleanCancels string highlighting when clicking on a column cells. Can be useful, when cell shows shows some interactive content.
stickedbooleanPins column to the left, during horizontal scrolling.
resizeablebooleanAllows restricting column size changes. By default, changing column size is permitted.
colorstringColumn background color. CSS can be set as the value, or color in the formats hex, rgb or hsl. Also, grid has a standard set of colors \Bitrix\Main\Grid\Column\Color.



© «Bitrix24», 2001-2024
Up