v7.3.0
SupportExamplesFree Trial

Column

The base class for all other grid column types, used if no type is specified on a column.

Default editor is a TextField.

const grid = new Grid({
  columns : [{
    field : 'name',
    text  : 'Name'
  }, {
    text  : 'Hobby',
    field : 'others.hobby', // reading nested field data
  }, {
    type  : 'number', // Will use NumberColumn
    field : 'age',
    text  : 'Age'
  }]
});

Column types

Grid ships with multiple different column types. Which type to use for a column is specified by the type config. The built-in types are:

  • action - displays actions (clickable icons) in the cell.
  • aggregate - a column, which, when used as part of a Tree, aggregates the values of this column's descendants using a configured function which defaults to sum.
  • check - displays a checkbox in the cell.
  • date - displays a date in the specified format.
  • number - a column for showing/editing numbers.
  • percent - displays a basic progress bar.
  • rating - displays a star rating.
  • rownumber - displays the row number in each cell.
  • template - uses a template for cell content.
  • time - displays a time in the specified format.
  • tree - displays a tree structure when using the tree feature.
  • widget - displays widgets in the cells.

Tree columns

You can add tree rendering to any column type by configuring it with tree : true:

const grid = new TreeGrid({
   columns : [
       // These are equivalent:
       { type: 'tree', field: 'name' },
       { field: 'name', tree: true },

// Any column type can be a tree column: { type: 'check', tree: true, field: 'done' } ] });

Grouped columns / headers

You can group headers by defining parent and children columns. A group can be dragged as a whole, or users can drag individual columns between groups. The same applies to column visibility using the column picker in the header menu, a group can be toggled as a whole or each column individually.

const grid = new Grid({
    {
            text     : 'Parent',
            children : [
                { text : 'Child 1', field : 'field1', flex : 1 },
                { text : 'Child 2', field : 'field2', flex : 1 }
            ]
        },
        ...
}

const grid = new Grid({ appendTo : targetElement, autoHeight : true, data : DataGenerator.generateData(3), columns : [ { text : 'Employee', children : [ { text : 'First name', field : 'firstName', flex : 1 }, { text : 'Surname', field : 'surName', flex : 1 } ] }, { text : 'Other Info', children : [ { text : 'City', field : 'city', width : 150 }, { text : 'Notes', field : 'notes', flex : 2 } ] } ] });

Collapsible columns

By configuring a parent column with collapsible: true it is made collapsible. When collapsing all child columns except the first one are hidden. This behaviour is configurable using the collapseMode config. To make a column start collapsed, set the collapsed config to true.

const grid = new Grid({ appendTo : targetElement, autoHeight : true, data : DataGenerator.generateData(3), columns : [ { text : 'Employee (toggleAll)', collapsible : true, collapsed : true, collapseMode : 'toggleAll', children : [ { text : 'First name', field : 'firstName', flex : 1 }, { text : 'Surname', field : 'surName', flex : 1 }, { text : 'Name', field : 'name', flex : 1, toggleAllHidden : true } ] }, { text : 'Other Info (showFirst)', collapsible : true, children : [ { text : 'City', field : 'city', width : 150 }, { text : 'Notes', field : 'notes', flex : 2 } ] } ] });

Adding widgets to the column header

You can add custom widgets to the column header element using the headerWidgets config.

const grid = new Grid({ appendTo : targetElement, autoHeight : true, data : DataGenerator.generateData(3), features : { sort : 'name' }, columns : [ { text : 'Name', field : 'name', flex : 1, headerWidgets : [ { type : 'button', text : 'Add row', rendition : 'filled', style : { 'margin-inline-start' : 'auto' }, onClick() { this.owner.grid.store.add({ name : 'New user' }); } } ] }, { text : 'City', field : 'city', width : 150 }, { text : 'Notes', field : 'notes', flex : 2 } ] });

Cell renderers and customizing cell content

Completely controlling cell contents

To completely control what is rendered into a cell, provide a renderer function which returns a string or a DomConfig DOM configuration object.

const grid = new Grid({
  columns : [
  ...
    {
      field      : 'approved',
      text       : 'Approved',
      htmlEncode : false, // allow to use HTML code
      renderer({ value }) {
        return value === true ? '<b>Yes</b>' : '<i>No</i>';
      }
    }
    ...
    ]
});

Augmenting the default rendering

To augment the default rendering of Column types which have their own special renderer, you can call the built-in renderer from your custom renderer, and use the result. For example, to highlight modified dates in a DateColumn:

new Grid({
    columns : [
        ...
        {
            type  : 'date',
            field : 'startDate',
            text  : 'Start Date',
            renderer({ record, value }) {
                const result = this.defaultRenderer({ value });

return record.isFieldModified('startDate') ? `<span class="modified">${result}</span>` : result; } } ] });

Mutating the cell element after the default rendering

You can also use the afterRenderCell callback to mutate the cell element after the default rendering.

new Grid({
    columns : [
        {
            text     : 'Name',
            afterRenderCell : ({ record, row, cellElement }) => {
                cellElement.classList.toggle('myClass', true);
                // Add special CSS class to new rows that have not yet been saved
                row.cls.newRow = record.isPhantom;
            }
        }
    ]
});

Using JSX in renderers (React)

When using the Bryntum React wrapper, renderers can return JSX elements instead of strings or DomConfig objects:

// In your React component's column config:
const columns = [
    {
        text     : 'Name',
        field    : 'name',
        renderer({ record }) {
            return <MyCustomComponent name={record.name} />;
        }
    }
];

// Then pass to the wrapper: <BryntumGrid columns={columns} />

Using JSX in renderers creates a React portal for each rendered cell. For grids with many rows or frequently re-rendered views, this may impact scrolling performance compared to returning plain strings or DomConfig objects. Consider using JSX renderers primarily for cells that require complex interactive React components.

Menus

You can add custom items to the context menu for a columns header and for its cells, using headerMenuItems and cellMenuItems. Here is an example:

const grid = new Grid({
  columns : [
    ...
    {
      type  : 'number',
      field : 'age',
      text  : 'Age',
      headerMenuItems: [{
          text : 'My unique header item',
          icon : 'fa fa-paw',
          onItem() { console.log('item clicked'); }
      }],
      cellMenuItems: [{
          text : 'My unique cell item',
          icon : 'fa fa-plus',
          onItem() { console.log('item clicked'); }
      }]
    }
  ...
  ]
});

Columns without a width will shrink or expand to the pinnedWidth value when pinned.

Useful configs and functions

Member Description
field Data model field to display
text Column header text
renderer Custom cell render function
editor Cell editor config or widget type
width Fixed column width in pixels
flex Flex value for proportional sizing
hidden Hides the column
sortable Enable/disable column sorting
filterable Enable/disable column filtering
headerMenuItems Custom header context menu items
cellMenuItems Custom cell context menu items

See also

No results

Fields

Fields belong to a Model class and define the Model data structure
  • This is a read-only field provided in server synchronization packets to specify which position the node takes in the parent's ordered children array. This index is set on load and gets updated on reordering nodes in tree. Sorting and filtering have no effect on it.

  • parentId : String/Number/null
    READONLY
    TreeNode

    This is a read-only field provided in server synchronization packets to specify which record id is the parent of the record.

  • This is a read-only field provided in server synchronization packets to specify which position the node takes in the parent's children array. This index is set on load and gets updated automatically after row reordering, sorting, etc. To save the order, need to persist the field on the server and when data is fetched to be loaded, need to sort by this field.

  • Deprecated:

    This field has been deprecated. Please read the guide to find out if your app needs to use the new isFullyLoaded field.

    This field is added to the class at runtime when the Store is configured with lazyLoad. The number specified should reflect the total amount of children of a parent node, including nested descendants.

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • fitMode : 'exact'/'textContent'/'value'/'none'/null'exact'

    Mode to use when measuring the contents of this column in calls to resizeToFitContent. Available modes are:

    • 'exact' - Most precise, renders and measures all cells (Default, slowest)
    • 'textContent' - Renders all cells but only measures the one with the longest textContent
    • 'value' - Renders and measures only the cell with the longest data (Fastest)
    • 'none'/falsy - Resize to fit content not allowed, a call does nothing

    Has a corresponding runtime fitMode property.

  • Column width as a flex weight. All columns with flex specified divide the available space (after subtracting fixed widths) between them according to the flex value. Columns that have flex : 2 will be twice as wide as those with flex : 1 (and so on)

    Has a corresponding runtime flex property.

  • Column maximal width. If value is Number, then maximal width is in pixels

    Has a corresponding runtime maxWidth property.

  • The text to show in the column header. You can display text vertically by setting the headerWritingMode property.

    Has a corresponding runtime text property.

  • Column width. If value is Number then width is in pixels

    Has a corresponding runtime width property.

  • Set to true to have the cell editor for this column inherit formula providers from the Grid's configured formulaProviders.

    Has a corresponding runtime formula property.

  • pinned : 'start'/'end'/null/false

    Set to 'end' or 'start' to pin the column to the respective side of the grid when PinColumns feature is enabled.

    Has a corresponding runtime pinned property.

  • When a column is pinned and it does not have a width specified, pinnedWidth will be used instead.

    Has a corresponding runtime pinnedWidth property.

  • Set this to true to not allow any type of editing in this column.

    Has a corresponding runtime readOnly property.

  • The aria-label to use for this Column`s header element

    Has a corresponding runtime ariaLabel property.

  • The aria-label to use for cells in this Column

    Has a corresponding runtime cellAriaLabel property.

  • Internal listeners, that cannot be removed by the user.

  • Used by the Export feature. Set to false to omit a column from an exported dataset

    Has a corresponding runtime exportable property.

  • Column type which will be used by TableExporter. See list of available types in TableExporter docs. Returns undefined by default, which means column type should be read from the record field.

    Has a corresponding runtime exportedType property.

  • Flag to enable vue component rendering

    Has a corresponding runtime vue property.

  • A config object used to configure an Editor which contains this Column's input field if CellEdit feature is enabled.

    Has a corresponding runtime cellEditor property.

  • The collapsed state of this column, only applicable for parent columns

    Has a corresponding runtime collapsed property.

  • If true, this column will show a collapse/expand icon in its header, only applicable for parent columns

    Has a corresponding runtime collapsible property.

  • Set to false to prevent this column header from being dragged

    Has a corresponding runtime draggable property.

  • Set to false to prevent grouping by this column

    Has a corresponding runtime groupable property.

  • Allow column visibility to be toggled through UI

    Has a corresponding runtime hideable property.

  • invalidAction : 'block'/'allow'/'revert''block'

    How to handle a request to complete a cell edit in this column if the field is invalid. There are three choices:

    • block The default. The edit is not exited, the field remains focused.
    • allow Allow the edit to be completed.
    • revert The field value is reverted and the edit is completed.

    Has a corresponding runtime invalidAction property.

  • Set to false to prevent the column from being drag-resized when the ColumnResize plugin is enabled.

    Has a corresponding runtime resizable property.

  • Setting this option means that pressing the Escape key after editing the field will revert the field to the value it had when the edit began. If the value is not changed from when the edit started, the input field's clearable behaviour will be activated. Finally, the edit will be canceled.

    Has a corresponding runtime revertOnEscape property.

  • sealed : Booleanfalse

    Setting this flag to true will prevent dropping child columns into a group column

    Has a corresponding runtime sealed property.

  • Allow searching in the column (respected by QuickFind and Search features)

    Has a corresponding runtime searchable property.

  • align : 'left'/'center'/'right'/'start'/'end'

    Text align. Accepts 'left'/'center'/'right' or direction neutral 'start'/'end'

    Has a corresponding runtime align property.

  • Columns hidden state. Specify true to hide the column, false to show it.

    Has a corresponding runtime hidden property.

  • locked : Booleanfalse

    Convenient way of putting a column in the "locked" region. Same effect as specifying region: 'locked'. If you have defined your own regions (using subGridConfigs) you should use region instead of this one.

    Has a corresponding runtime locked property.

  • Column minimum width. If value is Number, then minimal width is in pixels

    Has a corresponding runtime minWidth property.

  • Set to false to prevent showing a context menu on the cell elements in this column

    Has a corresponding runtime enableCellContextMenu property.

  • false to prevent showing a context menu on the column header element

    Has a corresponding runtime enableHeaderContextMenu property.

  • Show column picker for the column

    Has a corresponding runtime showColumnPicker property.

  • Set to trueto automatically call DomHelper.sync for html returned from a renderer. Should in most cases be more performant than replacing entire innerHTML of cell and also allows CSS transitions to work. Has no effect unless htmlEncode is disabled. Returned html must contain a single root element (that can have multiple children). See PercentColumn for example usage.

    Has a corresponding runtime autoSyncHtml property.

  • An optional query selector to select a sub element within the cell being edited to align a cell editor's X position and width to.

    Has a corresponding runtime editTargetSelector property.

  • filterType : 'text'/'date'/'number'/'duration'

    Determines which type of filtering to use for the column. Usually determined by the column type used, but may be overridden by setting this field.

    Has a corresponding runtime filterType property.

  • By default, any rendered column cell content is HTML-encoded. Set this flag to false disable this and allow rendering html elements

    Has a corresponding runtime htmlEncode property.

  • By default, the header text is HTML-encoded. Set this flag to false disable this and allow html elements in the column header

    Has a corresponding runtime htmlEncodeHeaderText property.

  • Set to true to have the CellEdit feature update the record being edited live upon field edit instead of when editing is finished by using Tab or Enter

    Has a corresponding runtime instantUpdate property.

  • Set to false to disable localization of this object.

  • Column settings at different responsive levels, see responsive demo under examples/

    Has a corresponding runtime responsiveLevels property.

  • Tags, may be used by ColumnPicker feature for grouping columns by tag in the menu

    Has a corresponding runtime tags property.

  • Column config to apply to normal config if viewed on a touch device

    Has a corresponding runtime touchConfig property.

  • When using the tree feature, exactly one column should specify { tree: true }

    Has a corresponding runtime tree property.

  • Child columns. To create grouped headers, specify an array of column configs as children of a parent column.

  • CSS class added to each cell in this column

    Has a corresponding runtime cellCls property.

  • CSS class added to the header of this column

    Has a corresponding runtime cls property.

  • Icon to display in header. Specifying an icon will render a <i> element with the icon as value for the class attribute

    Has a corresponding runtime icon property.

  • A tooltip string to show when hovering the column header, or a config object which can reconfigure the shared tooltip by setting boolean, numeric and string config values.

    Has a corresponding runtime tooltip property.

  • Summary configs, use if you need multiple summaries per column. Replaces sum and summaryRenderer configs.

    Has a corresponding runtime summaries property.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isColumn : Booleantrue
    READONLY
    static
    ADVANCED
    Identifies an object as an instance of Column class, or subclass thereof.
  • isEvents : Booleantrue
    READONLY
    static
    ADVANCED
    Events
    Identifies an object as an instance of Events class, or subclass thereof.
  • isLocalizable : Booleantrue
    READONLY
    static
    ADVANCED
    Localizable
    Identifies an object as an instance of Localizable class, or subclass thereof.
  • isModelStm : Booleantrue
    READONLY
    static
    ADVANCED
    ModelStm
    Identifies an object as an instance of ModelStm class, or subclass thereof.
  • isTreeNode : Booleantrue
    READONLY
    static
    ADVANCED
    TreeNode
    Identifies an object as an instance of TreeNode class, or subclass thereof.
  • properties : Object
    internal
    static
    Model

    A class property getter for the default values of internal properties for this class.

  • allFields : DataField[]
    READONLY
    static
    Model

    An array containing all the defined fields for this Model class. This will include all superclass's defined fields.

  • fieldMap : Object<String, DataField>
    READONLY
    static
    Model

    An object containing all the defined fields for this Model class. This will include all superclass's defined fields through its prototype chain. So be aware that Object.keys and Object.entries will only access this class's defined fields.

  • The data source for the id field which provides the ID of instances of this Model.

  • fitMode : 'exact'/'textContent'/'value'/'none'/null'exact'

    Mode to use when measuring the contents of this column in calls to resizeToFitContent. Available modes are:

    • 'exact' - Most precise, renders and measures all cells (Default, slowest)
    • 'textContent' - Renders all cells but only measures the one with the longest textContent
    • 'value' - Renders and measures only the cell with the longest data (Fastest)
    • 'none'/falsy - Resize to fit content not allowed, a call does nothing

    Has a corresponding fitMode config.

  • Column width as a flex weight. All columns with flex specified divide the available space (after subtracting fixed widths) between them according to the flex value. Columns that have flex : 2 will be twice as wide as those with flex : 1 (and so on)

    Has a corresponding flex config.

  • Column maximal width. If value is Number, then maximal width is in pixels

    Has a corresponding maxWidth config.

  • The text to show in the column header. You can display text vertically by setting the headerWritingMode property.

    Has a corresponding text config.

  • Column width. If value is Number then width is in pixels

    Has a corresponding width config.

  • allIndex : Number
    internal
    READONLY

    Index among all flattened columns

  • canSort : Boolean
    READONLY

    Returns true if this column can currently be sorted by the user. Checks both the column's own sortable config and whether the Sort feature is enabled on the grid.

  • defaultEditor : Object
    private
    READONLY

    A config object specifying the editor to use to edit this column.

  • defaults : Object
    READONLY

    Default settings for the column, applied in constructor. None by default, override in subclass.

  • editor : Field
    private
    READONLY

    The Field to use as editor for this column

    Has a corresponding editor config.

  • editorField : String
    internal
    READONLY

    Yields the name of the record field which the CellEdit feature edits when invoked on this column. This is usually this Column's field, but Column subclasses may implement this property.

  • Set to true to have the cell editor for this column inherit formula providers from the Grid's configured formulaProviders.

    Has a corresponding formula config.

  • grid : Grid
    READONLY

    Get the Grid instance to which this column belongs

  • headerText : String
    internal
    READONLY

    Returns header text based on htmlEncodeHeaderText config value.

  • headerWidgetMap : Object<String, Widget>
    internal
    READONLY

    An object which contains a map of the widgets contained in this column header keyed by their ref.

  • headerWidgetMap : Object<String, Widget>
    private
    READONLY

    An object which contains a map of the header widgets keyed by their ref.

  • pinned : 'start'/'end'/null/false

    Set to 'end' or 'start' to pin the column to the respective side of the grid when PinColumns feature is enabled.

    Has a corresponding pinned config.

  • When a column is pinned and it does not have a width specified, pinnedWidth will be used instead.

    Has a corresponding pinnedWidth config.

  • Set this to true to not allow any type of editing in this column.

    Has a corresponding readOnly config.

  • subGrid : SubGrid
    READONLY

    Get the SubGrid to which this column belongs

  • subGridElement : HTMLElement
    private
    READONLY

    Get the element for the SubGrid to which this column belongs

  • type : String
    READONLY

    Column name alias, which you can use in the columns array of a Grid. See type

  • Set this column to be visible or not

  • The aria-label to use for this Column`s header element

    Has a corresponding ariaLabel config.

  • The aria-label to use for cells in this Column

    Has a corresponding cellAriaLabel config.

  • emptyArray : Array
    internal
    READONLY
    Model

    An empty array that can be used as a default value.

  • emptyObject : Object
    internal
    READONLY
    Model

    An empty object that can be used as a default value.

  • isColumn : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of Column class, or subclass thereof.
  • isModel : Booleantrue
    READONLY
    ADVANCED
    Model
    Identifies an object as an instance of Model class, or subclass thereof.
  • copyOf : Model
    READONLY
    Model

    For copied records, this property links to the original model instance from which it was copied.

  • True if this Model is currently batching its changes.

  • True if this models changes are currently being committed.

  • True if this model has any uncommitted changes.

  • isValid : Boolean
    READONLY
    Model

    Check if record has valid data. Default implementation returns true, override in your model to do actual validation.

  • Get a map of the modified fields in form of an object. The field´s dataSource is used as the property name in the returned object. The record's id is included unless its persist config is false.

  • Get a map of the modified data fields along with any alwaysWrite fields, in form of an object. The field´s dataSource is used as the property name in the returned object. Used internally by AjaxStore / CrudManager when sending updates.

  • persistableData : Object
    internal
    READONLY
    Model

    Returns data for allpersistable fields in form of an object, using dataSource if present.

  • rawModificationData : Object
    internal
    READONLY
    Model

    Returns a map of the modified persistable fields

  • Used by the Export feature. Set to false to omit a column from an exported dataset

    Has a corresponding exportable config.

  • Column type which will be used by TableExporter. See list of available types in TableExporter docs. Returns undefined by default, which means column type should be read from the record field.

    Has a corresponding exportedType config.

  • Returns the string value for display purposes of an instance of this Model class. Needs to be overridden in subclasses.

  • When called on a group header row returns list of records in that group. Returns undefined otherwise.

  • Returns true for a group header record

  • Gets the records internalId. It is assigned during creation, guaranteed to be globally unique among models.

  • Returns true if the record is new and has not been persisted (and received a proper id).

  • Flag to enable vue component rendering

    Has a corresponding vue config.

  • A config object used to configure an Editor which contains this Column's input field if CellEdit feature is enabled.

    Has a corresponding cellEditor config.

  • The collapsed state of this column, only applicable for parent columns

    Has a corresponding collapsed config.

  • If true, this column will show a collapse/expand icon in its header, only applicable for parent columns

    Has a corresponding collapsible config.

  • Set to false to prevent this column header from being dragged

    Has a corresponding draggable config.

  • Set to false to prevent grouping by this column

    Has a corresponding groupable config.

  • Allow column visibility to be toggled through UI

    Has a corresponding hideable config.

  • invalidAction : 'block'/'allow'/'revert''block'

    How to handle a request to complete a cell edit in this column if the field is invalid. There are three choices:

    • block The default. The edit is not exited, the field remains focused.
    • allow Allow the edit to be completed.
    • revert The field value is reverted and the edit is completed.

    Has a corresponding invalidAction config.

  • Set to false to prevent the column from being drag-resized when the ColumnResize plugin is enabled.

    Has a corresponding resizable config.

  • Setting this option means that pressing the Escape key after editing the field will revert the field to the value it had when the edit began. If the value is not changed from when the edit started, the input field's clearable behaviour will be activated. Finally, the edit will be canceled.

    Has a corresponding revertOnEscape config.

  • sealed : Booleanfalse

    Setting this flag to true will prevent dropping child columns into a group column

    Has a corresponding sealed config.

  • Allow searching in the column (respected by QuickFind and Search features)

    Has a corresponding searchable config.

  • align : 'left'/'center'/'right'/'start'/'end'

    Text align. Accepts 'left'/'center'/'right' or direction neutral 'start'/'end'

    Has a corresponding align config.

  • Columns hidden state. Specify true to hide the column, false to show it.

    Has a corresponding hidden config.

  • locked : Booleanfalse

    Convenient way of putting a column in the "locked" region. Same effect as specifying region: 'locked'. If you have defined your own regions (using subGridConfigs) you should use region instead of this one.

    Has a corresponding locked config.

  • Column minimum width. If value is Number, then minimal width is in pixels

    Has a corresponding minWidth config.

  • config : Object
    READONLY
    ADVANCED
    Model

    Returns a copy of the full configuration which was used to configure this object.

  • isConstructing : Boolean
    READONLY
    ADVANCED
    Model

    This property is set to true before the constructor returns.

  • isDestroying : Boolean
    READONLY
    ADVANCED
    Model

    This property is set to true on entry to the destroy method. It remains on the objects after returning from destroy(). If isDestroyed is true, this property will also be true, so there is no need to test for both (for example, comp.isDestroying || comp.isDestroyed).

  • Is this record linked to another record?

  • Get the original record this record is linked to.

  • Set to false to prevent showing a context menu on the cell elements in this column

    Has a corresponding enableCellContextMenu config.

  • false to prevent showing a context menu on the column header element

    Has a corresponding enableHeaderContextMenu config.

  • Show column picker for the column

    Has a corresponding showColumnPicker config.

  • Set to trueto automatically call DomHelper.sync for html returned from a renderer. Should in most cases be more performant than replacing entire innerHTML of cell and also allows CSS transitions to work. Has no effect unless htmlEncode is disabled. Returned html must contain a single root element (that can have multiple children). See PercentColumn for example usage.

    Has a corresponding autoSyncHtml config.

  • An optional query selector to select a sub element within the cell being edited to align a cell editor's X position and width to.

    Has a corresponding editTargetSelector config.

  • filterType : 'text'/'date'/'number'/'duration'

    Determines which type of filtering to use for the column. Usually determined by the column type used, but may be overridden by setting this field.

    Has a corresponding filterType config.

  • Get the first store that this model is assigned to.

  • By default, any rendered column cell content is HTML-encoded. Set this flag to false disable this and allow rendering html elements

    Has a corresponding htmlEncode config.

  • By default, the header text is HTML-encoded. Set this flag to false disable this and allow html elements in the column header

    Has a corresponding htmlEncodeHeaderText config.

  • Set to true to have the CellEdit feature update the record being edited live upon field edit instead of when editing is finished by using Tab or Enter

    Has a corresponding instantUpdate config.

  • Get the global LocaleHelper

  • Get the global LocaleManager

  • Column settings at different responsive levels, see responsive demo under examples/

    Has a corresponding responsiveLevels config.

  • Reference to STM manager, if used

  • Tags, may be used by ColumnPicker feature for grouping columns by tag in the menu

    Has a corresponding tags config.

  • Column config to apply to normal config if viewed on a touch device

    Has a corresponding touchConfig config.

  • tree : Boolean
    READONLY

    When using the tree feature, exactly one column should specify { tree: true }

    Has a corresponding tree config.

  • This yields true if this record is eligible for syncing with the server. It can yield false if the record is in the middle of a batched update, or if it is a tentative record yet to be confirmed as a new addition.

  • isRemoved : Boolean
    internal
    READONLY
    Model

    Returns true if this record is not part of any store.

  • Retrieve all children, excluding filtered out nodes (by traversing sub nodes)

  • Retrieve all children, including filtered out nodes (by traversing sub nodes)

  • Depth in the tree at which this node exists. First visual level of nodes are at level 0, their direct children at level 1 and so on.

  • Count all children (including sub-children) for a node (in its `firstStore´)

  • Get the first child of this node

  • indexPath : Number[]
    private
    READONLY
    Model

    Returns index path to this node. This is the index of each node in the node path starting from the topmost parent. (only relevant when its part of a tree store).

  • Is a leaf node in a tree structure?

  • Returns true for parent nodes with children loaded (there might still be no children)

  • Is a parent node in a tree structure?

  • Returns true if this node is the root of the tree

  • Get the last child of this node

  • Get the next sibling of this node

  • parent : Model
    READONLY
    TreeNode

    This is a read-only property providing access to the parent node.

  • Get the previous sibling of this node

  • Returns count of all preceding sibling nodes (including their children).

  • Array of tree nodes without any filter applied. On first filter, will take order from sorted children, but is not thereafter kept in sorted order, so order should not be relied upon.

  • Count visible (expanded) children (including sub-children) for a node (in its firstStore)

  • CSS class added to each cell in this column

    Has a corresponding cellCls config.

  • CSS class added to the header of this column

    Has a corresponding cls config.

  • Icon to display in header. Specifying an icon will render a <i> element with the icon as value for the class attribute

    Has a corresponding icon config.

  • A tooltip string to show when hovering the column header, or a config object which can reconfigure the shared tooltip by setting boolean, numeric and string config values.

    Has a corresponding tooltip config.

  • sum : 'sum'/'add'/'count'/'countNotEmpty'/'average'+ 1 more

    Summary type (when using Summary feature). Valid types are:

    • 'sum' - Sum of all values in the column
    • 'add' - Alias for sum
    • 'count' - Number of rows
    • 'countNotEmpty' - Number of rows containing a value
    • 'average' - Average of all values in the column
    • callbackFn - A custom function, used with store.reduce. Its return value becomes the value of the accumulator parameter on the next invocation of callbackFn

    Has a corresponding sum config.

  • Summary configs, use if you need multiple summaries per column. Replaces sum and summaryRenderer configs.

    Has a corresponding summaries config.

  • Returns values of the persistable tree-defining fields: parentId, orderedParentIndex, and parentIndex or sparseIndex. parentIndex is omitted when sparseIndex is used.

Functions

Functions are methods available for calling on the class
  • onClassMixedIn( )
    internal
    static
    Model

    This optional class method is called when a class is mixed in using the mixin() method.

  • initClass( )
    static
    ADVANCED
    Model

    Registers this class type with its Factory

  • exposeRelations( )
    internal
    static
    Model

    Makes getters and setters for related records. Populates a Model#relation array with the relations, to allow it to be modified later when assigning stores.

  • applyState( )
    private

    Apply state to column, used by State mixin

  • getState( )
    private

    Get column state, used by State mixin

  • hide( )
    ASYNC

    Hides this column.

  • Refreshes all the cells for this column

  • Rerender the header for this column

  • show( )
    ASYNC

    Shows this column.

  • Cancels current batch operation. Any changes during the batch are discarded.

  • Reverts changes in this back to their original values.

  • Internal function used to hook destroy() calls when using thisObj

  • Internal function used restore hooked destroy() calls when using thisObj

  • doDestroy( )
    internal
    Events

    Auto detaches listeners registered from start, if set as detachable

  • once( )
    private
    Events

    Internal function used to run a callback function after an event is triggered

  • Removes all listeners registered to this object by the application.

  • Called from insertChild to notify StateTrackingManager about children insertion. Provides it with all necessary context information collected in beforeInsertChild required to undo/redo the action.

  • Called from removeChild to notify StateTrackingManager about children removing. Provides it with all necessary context information collected in beforeRemoveChild required to undo/redo the action.

  • Called during creation to also turn any children into Models joined to the same stores as this model

  • initRelations( )
    private
    Model

    Initializes model relations. Called from store when adding a record.

  • clear( )
    private
    TreeNode

    Removes all records from the rootNode

Events

Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

Event handlers

Event handlers are callbacks called as a result of certain actions in this class
type: column

Source path

Grid/column/Column.js

Contents