A function used by LyteNyte Grid to determine the ideal width for a column based on a representative sample of cell content.
This is called when autosize is triggered via the grid's API. Returning null
disables sizing behavior.
params | AutosizeCellParams (docs) |
number | null
Parameters passed to the AutosizeCellFn function.
These provide context about the cell and grid configuration so that the function can determine the optimal column width based on cell content.
A reference to a column definition in LyteNyte Grid.
Type | Column |
A reference to the LyteNyte Grid instance.
Type | Grid |
The row node instance in LyteNyte Grid.
Type | RowNode |
A function used by LyteNyte Grid to calculate the ideal width for a column header based on the header's rendered content.
This is called as part of the grid's autosize process.
params | AutosizeHeaderParams (docs) |
number | null
Parameters passed to the AutosizeHeaderFn function.
These are used by LyteNyte Grid to calculate the ideal column width based on the header content.
A reference to a column definition in LyteNyte Grid.
Type | Column |
A reference to the LyteNyte Grid instance.
Type | Grid |
Describes a column definition in LyteNyte Grid.
Columns define how data is presented and interacted with in the grid. They control rendering, grouping, sorting, filtering, editing, and more.
A grid must define at least one column to display meaningful data. Columns are essential for determining:
Function that computes the ideal width for the column based on sampled cell content.
Type | AutosizeCellFn |
Function that computes the ideal width for the column header based on its content.
Type | AutosizeHeaderFn |
Defines how to render the cell content. Accepts a renderer function or a string referencing a registered renderer.
string | CellRendererFn
string
CellRendererFn
(docs)Defines how many columns the cell should span. Can be a fixed number or a function that returns a span dynamically.
number | CellSpanFn
number
CellSpanFn
(docs)Controls whether cells in the column can be edited.
Editing is only possible when both the grid is in edit mode and this flag is set.
Type | Editable |
Specifies a custom cell editor to use when the cell enters edit mode.
Type | EditRenderer |
Custom logic for applying an edit to the row's data. Required when editing fields that need special update logic.
Type | EditSetterFn |
Determines how the cell value should be retrieved or computed for the column. If omitted, the column's id
is used as a fallback.
Type | Field |
Function used to render a floating row cell. Only called when floating rows are enabled. Must return a React node.
Represents the hierarchical path of column groups the column belongs to. Each string corresponds to a level in the nesting hierarchy.
No properties
Controls the visibility behavior of a column when its group is collapsed.
Determines whether the column is always visible, only visible when expanded, or only visible when collapsed.
Function used to render the column's header. Must return a React node.
Controls the visibility of the column. When set to true
, the column is hidden from the grid display.
boolean
A required unique identifier for the column. This value must be distinct among all columns.
string
A human-readable name for the column. Useful when id
is more technical or programmatic.
string
Defines whether the column is pinned to the start or end of the grid. Pinned columns remain visible regardless of horizontal scroll.
Type | ColumnPin |
When true
, the column is excluded from the quick search filter.
Useful for non-textual or metadata columns that should not be searchable by users.
boolean
Defines how many rows the cell should span. Can be a fixed number or a function that returns a span dynamically.
number | CellSpanFn
number
CellSpanFn
(docs)Specifies the column's data type. Can be one of the built-in types or a custom string label.
"string" | "number" | | "date" | "datetime"
"string"
"number"
"date"
"datetime"
Describes the capabilities and intended UI behavior of the column. These hints are used by external UI components.
Type | ColumnUIHints |
Specifies the preferred width of the column. This value is ignored if flex sizing is used, or if it violates the column's min/max bounds.
number
Specifies the flex ratio this column should take when distributing remaining space.
Similar to CSS flex
, it controls how extra space is shared among flex-enabled columns.
number
Defines the maximum width the column is allowed to occupy.
number
Defines the minimum width the column is allowed to occupy.
number
Represents the default column configuration used by LyteNyte Grid.
This serves as a base template that provides fallback values for various column properties. Rather than merging, LyteNyte Grid looks up configuration properties on the column first, then on the default.
This allows you to set column-wide defaults that apply retroactively to all applicable columns without rewriting each one.
Function that computes the ideal width for the column based on sampled cell content.
Type | AutosizeCellFn |
Function that computes the ideal width for the column header based on its content.
Type | AutosizeHeaderFn |
Defines how to render the cell content. Accepts a renderer function or a string referencing a registered renderer.
string | CellRendererFn
string
CellRendererFn
(docs)Controls whether cells in the column can be edited.
Editing is only possible when both the grid is in edit mode and this flag is set.
Type | Editable |
Specifies a custom cell editor to use when the cell enters edit mode.
Type | EditRenderer |
Custom logic for applying an edit to the row's data. Required when editing fields that need special update logic.
Type | EditSetterFn |
Function used to render a floating row cell. Only called when floating rows are enabled. Must return a React node.
Function used to render the column's header. Must return a React node.
Controls the visibility of the column. When set to true
, the column is hidden from the grid display.
boolean
When true
, the column is excluded from the quick search filter.
Useful for non-textual or metadata columns that should not be searchable by users.
boolean
Describes the capabilities and intended UI behavior of the column. These hints are used by external UI components.
Type | ColumnUIHints |
Specifies the preferred width of the column. This value is ignored if flex sizing is used, or if it violates the column's min/max bounds.
number
Specifies the flex ratio this column should take when distributing remaining space.
Similar to CSS flex
, it controls how extra space is shared among flex-enabled columns.
number
Defines the maximum width the column is allowed to occupy.
number
Defines the minimum width the column is allowed to occupy.
number
Defines the structure of a marker column.
The marker column is a grid managed column used to support features like selection checkboxes or row drag handles.
Defines how to render the cell content. Accepts a renderer function or a string referencing a registered renderer.
string | CellRendererFn
string
CellRendererFn
(docs)Function used to render a floating row cell. Only called when floating rows are enabled. Must return a React node.
Function used to render the column's header. Must return a React node.
Describes the capabilities and intended UI behavior of the column. These hints are used by external UI components.
Type | ColumnUIHints |
Specifies the preferred width of the column. This value is ignored if flex sizing is used, or if it violates the column's min/max bounds.
number
Represents runtime metadata for the current column configuration in LyteNyte Grid.
This metadata is primarily useful for programmatic interaction with the grid. The values
are derived from the grid's internal column state and may change depending on modes
like pivoting. For example, when pivot mode is enabled, columnsVisible
refers to
visible pivot columns instead of the regular ones.
A lookup map from column id to column definition. Useful for quick access or metadata introspection.
Type | Map |
An array of currently visible columns, accounting for hide
flags and
column group collapse states.
No properties
The count of visible columns that are unpinned (center-aligned).
number
The count of visible columns pinned to the end of the grid.
number
The count of visible columns pinned to the start of the grid.
number
Represents the possible pinned positions a column can occupy in LyteNyte Grid.
The actual position is determined by the document's reading direction:
"start"
pins to the left and "end"
to the right.This approach aligns with CSS logical properties for layout direction.
"start" | "end" | null
"start"
"end"
null
Describes UI hints related to column pivot functionality.
These hints indicate whether a column is eligible to act as a value, row group, or column pivot in a pivot table configuration. External components can use these values to determine pivot-related capabilities.
Indicates whether the column can be used as a pivot column header.
boolean
Indicates whether the column can be used as a pivot row group.
boolean
Indicates whether the column can be used as a pivot value.
boolean
UI hints describing column capabilities in LyteNyte Grid.
These hints can be used by external components to drive UI decisions (e.g. enabling/disabling sort or resize handles). They are not enforced by LyteNyte Grid and can be bypassed by modifying grid state directly.
Includes support for pivot-specific behaviors via ColumnPivotUIHints .
UI hint specifying the default aggregation function to apply to this column.
This is especially relevant in pivot mode or when row grouping is active.
string
UI hint specifying the list of valid aggregation functions that can be applied to this column. If unset, the column may not support aggregation.
No properties
UI hints for pivot-related behaviors, specifying whether a column can act as a value, row, or column pivot.
UI hint indicating whether the column can be repositioned by dragging. This only affects drag-and-drop behaviors; programmatic moves are still possible.
boolean
UI hint indicating whether the column can be resized by the user.
When set to false
, resize handles will be hidden.
boolean
UI hint indicating whether this column can be used for row grouping.
boolean
UI hint indicating whether this column supports sorting. LyteNyte Grid may
hide sort controls if this is set to false
.
boolean
The internal definition used by LyteNyte Grid to automatically generate group columns when row grouping is enabled.
These columns are created behind the scenes to represent group headers and aggregations and can be configured via this interface.
Function that computes the ideal width for the column based on sampled cell content.
Type | AutosizeCellFn |
Function that computes the ideal width for the column header based on its content.
Type | AutosizeHeaderFn |
Defines how to render the cell content. Accepts a renderer function or a string referencing a registered renderer.
string | CellRendererFn
string
CellRendererFn
(docs)Determines how the cell value should be retrieved or computed for the column. If omitted, the column's id
is used as a fallback.
Type | Field |
Function used to render a floating row cell. Only called when floating rows are enabled. Must return a React node.
Function used to render the column's header. Must return a React node.
Controls the visibility of the column. When set to true
, the column is hidden from the grid display.
boolean
A human-readable name for the column. Useful when id
is more technical or programmatic.
string
Defines whether the column is pinned to the start or end of the grid. Pinned columns remain visible regardless of horizontal scroll.
Type | ColumnPin |
Describes the capabilities and intended UI behavior of the column. These hints are used by external UI components.
Type | ColumnUIHints |
Specifies the preferred width of the column. This value is ignored if flex sizing is used, or if it violates the column's min/max bounds.
number
Specifies the flex ratio this column should take when distributing remaining space.
Similar to CSS flex
, it controls how extra space is shared among flex-enabled columns.
number
Defines the maximum width the column is allowed to occupy.
number
Defines the minimum width the column is allowed to occupy.
number