Column Properties
The wijmo.grid.Column class has almost 40 properties which you can use to configure each column's appearance and behavior.
These properties are set automatically for auto-generated columns, but when creating columns in code you will normally set a few of these:
- binding: Defines property of the data item to be shown in the column.
- header: Defines the content of column's header cell.
- format: Specifies format string used to convert numbers and dates into display strings for the column.
- width: Specifies width of the column in pixels. You may also use 'star' sizing to specify the column width in relative units (e.g. '2*' is twice as wide as '*').
- align: Defines the horizontal alignment of items in the column. This is set to null by default, which aligns data based on the column's data type. You can override the default by setting this property to 'left', 'right', or 'center'.
- isReadOnly: Determines whether the column can be edited by the user. You can disable editing altogether by setting the grid's isReadOnly property to false.
- isRequired: Determines whether users should be able to set values in the column to empty strings or null values.
For example, the grid below has a custom set of columns with the main properties set in code: