Class Grid.Column<T>

java.lang.Object
com.vaadin.flow.component.Component
io.jmix.groupgridflowui.kit.vaadin.grid.Grid.Column<T>
Type Parameters:
T - type of the underlying grid this column is compatible with
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasStyle, Serializable
Direct Known Subclasses:
DataGridColumn
Enclosing class:
Grid<T>

@Tag("vaadin-grid-column") @NpmPackage(value="@vaadin/polymer-legacy-adapter", version="24.9.0") @JsModule("@vaadin/polymer-legacy-adapter/style-modules.js") public static class Grid.Column<T> extends com.vaadin.flow.component.Component
Server-side component for the <vaadin-grid-column> element.

Every added column sends data to the client side regardless of its visibility state. Don't add a new column at all or use Grid.removeColumn(Column) to avoid sending extra data.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Grid<?>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Column(Grid<T> grid, String columnId, com.vaadin.flow.data.renderer.Renderer<T> renderer)
    Constructs a new Column for use inside a Grid.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.vaadin.flow.function.SerializableComparator<T>
     
    protected com.vaadin.flow.function.SerializableFunction<T,? extends com.vaadin.flow.component.Component>
     
     
    protected com.vaadin.flow.shared.Registration
    addDataGenerator(com.vaadin.flow.data.provider.DataGenerator<T> dataGenerator)
     
    protected void
     
    protected List<Grid.Column<?>>
    Gets recursively the child components of this component that are instances of Column.
    protected Grid.Column<?>
    Gets the <vaadin-grid-column> component that is a child of this component, or this component in case this is a bottom level <vaadin-grid-column> component.
    com.vaadin.flow.function.SerializableFunction<T,String>
    Gets the function that is used for generating CSS class names for cells in this column.
    com.vaadin.flow.function.SerializableComparator<T>
    getComparator(com.vaadin.flow.data.provider.SortDirection sortDirection)
    Gets the comparator to use with in-memory sorting for this column when sorting in the given direction.
    com.vaadin.flow.component.Component
    Gets the editor component that is used for this column.
    com.vaadin.flow.dom.Element
    Gets the underlying <vaadin-grid-column> element.
    int
    Gets the flex grow value, by default 1.
    com.vaadin.flow.component.Component
    Returns the footer component of the column.
    default String
    Gets the custom part name of the footer cell.
    Returns the footer text of the column.
    Grid<?>
    Gets the owner of this column.
    com.vaadin.flow.component.Component
    Returns the header component of the column.
    default String
    Gets the custom part name of the header cell.
    Returns the header text of the column.
    protected String
     
    Gets the user-defined key for this column, or null if no key has been set.
    com.vaadin.flow.function.SerializableFunction<T,String>
    Gets the function that is used for generating CSS part names for cells in this column.
    com.vaadin.flow.data.renderer.Renderer<T>
    Get the renderer used for this column.
    Stream<com.vaadin.flow.data.provider.QuerySortOrder>
    getSortOrder(com.vaadin.flow.data.provider.SortDirection direction)
    Gets the sort orders to use with back-end sorting for this column when sorting in the given direction.
    Gets the column text align.
    com.vaadin.flow.function.SerializableFunction<T,String>
     
    Gets the width of this column as a CSS-string.
    protected boolean
     
    boolean
    Gets this column's auto width state.
    default boolean
    Gets the this column's frozen state.
    default boolean
    Gets the this column's frozen state.
    default boolean
    Gets whether this column is user-resizable.
    boolean
    Gets whether cells in this column should be announced as row headers.
    boolean
    Gets whether this column is sortable (e.g.
    protected void
    moveFooterContent(io.jmix.groupgridflowui.kit.vaadin.grid.AbstractColumn<?> otherColumn)
    Moves the current footer content, either a text or a component, to a different column or column group.
    protected void
    moveHeaderContent(io.jmix.groupgridflowui.kit.vaadin.grid.AbstractColumn<?> otherColumn)
    Moves the current header content, either a text or a component, to a different column or column group.
    setAutoWidth(boolean autoWidth)
    Enables or disables automatic width for this column.
    setClassNameGenerator(com.vaadin.flow.function.SerializableFunction<T,String> classNameGenerator)
    <V extends Comparable<? super V>>
    Grid.Column<T>
    setComparator(com.vaadin.flow.function.ValueProvider<T,V> keyExtractor)
    Sets a comparator to use with in-memory sorting with this column based on the return type of the given ValueProvider.Sorting with a back-end is done using setSortProperty(String[]).
    setComparator(Comparator<T> comparator)
    Sets a comparator to use with in-memory sorting with this column.
    setEditorComponent(com.vaadin.flow.component.Component editorComponent)
    Sets a component to use for editing values of this column in the editor row.
    setEditorComponent(com.vaadin.flow.function.SerializableFunction<T,? extends com.vaadin.flow.component.Component> componentCallback)
    Sets a function that returns the editor component to be used for an specific item in the editor row.
    setFlexGrow(int flexGrow)
    Sets the flex grow ratio for this column.
    setFooter(com.vaadin.flow.component.Component footerComponent)
    Sets a footer component to the column.
    setFooter(String labelText)
    Sets a footer text to the column.
    protected void
    setFooterComponent(com.vaadin.flow.component.Component component)
     
    default Grid.Column<T>
    setFooterPartName(String footerPartName)
    Sets a custom part name for the footer cell.
    protected void
     
    default Grid.Column<T>
    setFrozen(boolean frozen)
    Sets this column's frozen state.
    default Grid.Column<T>
    setFrozenToEnd(boolean frozenToEnd)
    Sets this column's frozen state.
    setHeader(com.vaadin.flow.component.Component headerComponent)
    Sets a header component to the column.
    setHeader(String labelText)
    Sets a header text to the column.
    protected void
    setHeaderComponent(com.vaadin.flow.component.Component component)
     
    default Grid.Column<T>
    setHeaderPartName(String headerPartName)
    Sets a custom part name for the header cell.
    protected void
     
    Sets the user-defined identifier to map this column.
    setPartNameGenerator(com.vaadin.flow.function.SerializableFunction<T,String> partNameGenerator)
    Sets the function that is used for generating CSS part names for cells in this column.
    setRenderer(com.vaadin.flow.data.renderer.Renderer<T> renderer)
    Set the renderer for this column.
    default Grid.Column<T>
    setResizable(boolean resizable)
    When set to true, the column is user-resizable.
    setRowHeader(boolean rowHeader)
    Sets whether cells in this column should be announced as row headers.
    setSortable(boolean sortable)
    Sets whether the user can sort this column or not.
    protected void
    setSortingIndicators(boolean sortingIndicators)
    Sets this component to show sorting indicators or not.
    Sets the sort orders when sorting this column.
    setSortProperty(String... properties)
    Sets strings describing back end properties to be used when sorting this column.
    default Grid.Column<T>
    Sets the column text align.
    setTooltipGenerator(com.vaadin.flow.function.SerializableFunction<T,String> tooltipGenerator)
    Sets the function that is used for generating tooltip text for cells in this column.
    void
    setVisible(boolean visible)
    Sets the width of this column as a CSS-string.
    protected void
    updateSortingIndicators(boolean sortable)
    Updates this component to either have sorting indicators according to the sortable state of the underlying column, or removes the sorting indicators.

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getChildren, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
  • Field Details

    • grid

      protected final Grid<?> grid
  • Constructor Details

    • Column

      public Column(Grid<T> grid, String columnId, com.vaadin.flow.data.renderer.Renderer<T> renderer)
      Constructs a new Column for use inside a Grid.
      Parameters:
      grid - the grid this column is attached to
      columnId - unique identifier of this column
      renderer - the renderer to use in this column, must not be null
  • Method Details

    • destroyDataGenerators

      protected void destroyDataGenerators()
    • getInternalId

      protected String getInternalId()
    • getRenderer

      public com.vaadin.flow.data.renderer.Renderer<T> getRenderer()
      Get the renderer used for this column.

      Note: Mutating the renderer after the Grid has been rendered on the client will not change the column, and can lead to undefined behavior.

      Returns:
      the renderer used for this column, should never be null
    • setRenderer

      public Grid.Column<T> setRenderer(com.vaadin.flow.data.renderer.Renderer<T> renderer)
      Set the renderer for this column.
      Parameters:
      renderer - the new renderer to be used for this column, must not be null
      Since:
      24.1
    • setWidth

      public Grid.Column<T> setWidth(String width)
      Sets the width of this column as a CSS-string.

      Please note that using the em length unit is discouraged as it might lead to misalignment issues if the header, body, and footer cells have different font sizes. Instead, use rem if you need a length unit relative to the font size.

      Parameters:
      width - the width to set this column to, as a CSS-string, not null
      Returns:
      this column, for method chaining
      See Also:
    • getWidth

      @Synchronize("column-drag-resize") public String getWidth()
      Gets the width of this column as a CSS-string.
      Returns:
      the width of this column as a CSS-string
      See Also:
    • setFlexGrow

      public Grid.Column<T> setFlexGrow(int flexGrow)
      Sets the flex grow ratio for this column. When set to 0, column width is fixed.
      Parameters:
      flexGrow - the flex grow ratio
      Returns:
      this column, for method chaining
      See Also:
    • getFlexGrow

      @Synchronize("column-drag-resize") public int getFlexGrow()
      Gets the flex grow value, by default 1.
      Returns:
      the flex grow value, by default 1
      See Also:
    • setAutoWidth

      public Grid.Column<T> setAutoWidth(boolean autoWidth)
      Enables or disables automatic width for this column.

      Automatically sets the width of the column based on the column contents when this is set to true.

      For performance reasons the column width is calculated automatically only once when the grid items are rendered for the first time and the calculation only considers the rows which are currently rendered in DOM (a bit more than what is currently visible). If the grid is scrolled, or the cell content changes, the column width might not match the contents anymore.

      Hidden columns are ignored in the calculation and their widths are not automatically updated when you show a column that was initially hidden.

      You can manually trigger the auto sizing behavior again by calling Grid.recalculateColumnWidths().

      The column width may still grow larger when flexGrow is not 0.

      Parameters:
      autoWidth - whether to enable or disable automatic width on this column
      Returns:
      this column, for method chaining
      See Also:
    • isAutoWidth

      public boolean isAutoWidth()
      Gets this column's auto width state.
      Returns:
      whether this column has automatic width enabled
    • setKey

      public Grid.Column<T> setKey(String key)
      Sets the user-defined identifier to map this column. The key can be used to fetch the column later with Grid.getColumnByKey(String).

      The key is also used as the backend sort property for this column if no sort property or sort order provider has been set for this column.

      The key has to be unique within the grid, and it can't be changed after set once.

      Parameters:
      key - the identifier key, can't be null
      Returns:
      this column
      See Also:
    • getKey

      public String getKey()
      Gets the user-defined key for this column, or null if no key has been set.
      Returns:
      the user-defined key
    • getElement

      public com.vaadin.flow.dom.Element getElement()
      Gets the underlying <vaadin-grid-column> element.

      It is highly discouraged to directly use the API exposed by the returned element.

      Specified by:
      getElement in interface com.vaadin.flow.component.HasElement
      Overrides:
      getElement in class com.vaadin.flow.component.Component
      Returns:
      the root element of this component
    • setComparator

      public Grid.Column<T> setComparator(Comparator<T> comparator)
      Sets a comparator to use with in-memory sorting with this column. Sorting with a back-end is done using setSortProperty(String...).

      Note: calling this method automatically sets the column as sortable with setSortable(boolean).

      Note: Comparator is not serializable. If you need to write serializable implementation, use inlined class of SerializableComparator instead of Lambda expression.

      Parameters:
      comparator - the comparator to use when sorting data in this column
      Returns:
      this column
    • setComparator

      public <V extends Comparable<? super V>> Grid.Column<T> setComparator(com.vaadin.flow.function.ValueProvider<T,V> keyExtractor)
      Sets a comparator to use with in-memory sorting with this column based on the return type of the given ValueProvider.Sorting with a back-end is done using setSortProperty(String[]).

      Note: calling this method automatically sets the column as sortable with setSortable(boolean).

      Type Parameters:
      V - the value of the column
      Parameters:
      keyExtractor - the value provider used to extract the Comparable sort key
      Returns:
      this column
      See Also:
    • getComparator

      public com.vaadin.flow.function.SerializableComparator<T> getComparator(com.vaadin.flow.data.provider.SortDirection sortDirection)
      Gets the comparator to use with in-memory sorting for this column when sorting in the given direction.

      Note: calling this method automatically sets the column as sortable with setSortable(boolean).

      Parameters:
      sortDirection - the direction this column is sorted by
      Returns:
      comparator for this column
    • setSortProperty

      public Grid.Column<T> setSortProperty(String... properties)
      Sets strings describing back end properties to be used when sorting this column.

      Note: calling this method automatically sets the column as sortable with setSortable(boolean).

      Parameters:
      properties - the array of strings describing backend properties
      Returns:
      this column
    • setSortOrderProvider

      public Grid.Column<T> setSortOrderProvider(SortOrderProvider provider)
      Sets the sort orders when sorting this column. The sort order provider is a function which provides QuerySortOrder objects to describe how to sort by this column.

      The default provider uses the sort properties set with setSortProperty(String...).

      Note: calling this method automatically sets the column as sortable with setSortable(boolean).

      Parameters:
      provider - the function to use when generating sort orders with the given direction
      Returns:
      this column
    • getSortOrder

      public Stream<com.vaadin.flow.data.provider.QuerySortOrder> getSortOrder(com.vaadin.flow.data.provider.SortDirection direction)
      Gets the sort orders to use with back-end sorting for this column when sorting in the given direction.
      Parameters:
      direction - the sorting direction
      Returns:
      stream of sort orders
      See Also:
    • setSortable

      public Grid.Column<T> setSortable(boolean sortable)
      Sets whether the user can sort this column or not.
      Parameters:
      sortable - true if the column can be sorted by the user; false if not
      Returns:
      this column
    • isSortable

      public boolean isSortable()
      Gets whether this column is sortable (e.g. shows the sorting indicators at the client-side).
      Returns:
      true if the column is sortable, false otherwise
    • setHeader

      public Grid.Column<T> setHeader(String labelText)
      Sets a header text to the column.

      If there are no header rows when calling this method, the first header row will be created. If there are header rows, the header will be set on the first created header row and it will override any existing header.

      Parameters:
      labelText - the text to be shown at the column header
      Returns:
      this column, for method chaining
    • setFooter

      public Grid.Column<T> setFooter(String labelText)
      Sets a footer text to the column.

      If there are no footer rows when calling this method, the first footer row will be created. If there are footer rows, the footer will be set on the bottom footer row and it will override any existing footer.

      Parameters:
      labelText - the text to be shown at the column footer
      Returns:
      this column, for method chaining
    • setHeader

      public Grid.Column<T> setHeader(com.vaadin.flow.component.Component headerComponent)
      Sets a header component to the column.

      If there are no header rows when calling this method, the first header row will be created. If there are header rows, the header will be set on the first created header row and it will override any existing header.

      Parameters:
      headerComponent - the component to be used in the header of the column
      Returns:
      this column, for method chaining
    • setFooter

      public Grid.Column<T> setFooter(com.vaadin.flow.component.Component footerComponent)
      Sets a footer component to the column.

      If there are no footer rows when calling this method, the first footer row will be created. If there are footer rows, the footer will be set on the bottom footer row and it will override any existing footer.

      Parameters:
      footerComponent - the component to be used in the footer of the column
      Returns:
      this column, for method chaining
    • setEditorComponent

      public Grid.Column<T> setEditorComponent(com.vaadin.flow.component.Component editorComponent)
      Sets a component to use for editing values of this column in the editor row. This is a convenient way for use in simple cases where the same component can be used to edit all the items. Use setEditorComponent(SerializableFunction) to support more complex cases.
      Parameters:
      editorComponent - the editor component, or null to remove the editor component for this column
      Returns:
      this column
      See Also:
    • setEditorComponent

      public Grid.Column<T> setEditorComponent(com.vaadin.flow.function.SerializableFunction<T,? extends com.vaadin.flow.component.Component> componentCallback)
      Sets a function that returns the editor component to be used for an specific item in the editor row.
      Parameters:
      componentCallback - the editor component function, or null to remove the editor component for this column
      Returns:
      this column
      See Also:
    • getEditorComponent

      public com.vaadin.flow.component.Component getEditorComponent()
      Gets the editor component that is used for this column.
      Returns:
      the editor component, or null if no component is set, or if it was set by using setEditorComponent(SerializableFunction).
      See Also:
    • setClassNameGenerator

      @Deprecated public Grid.Column<T> setClassNameGenerator(com.vaadin.flow.function.SerializableFunction<T,String> classNameGenerator)
      Sets the function that is used for generating CSS class names for cells in this column. Returning null from the generator results in no custom class name being set. Multiple class names can be returned from the generator as space-separated.

      If Grid.setClassNameGenerator(SerializableFunction) is used together with this method, resulting class names from both methods will be effective. Class names generated by grid are applied to the cells before the class names generated by column. This means that if the classes contain conflicting style properties, column's classes will win.

      Parameters:
      classNameGenerator - the class name generator to set, not null
      Returns:
      this column
      Throws:
      NullPointerException - if classNameGenerator is null
      See Also:
    • setPartNameGenerator

      public Grid.Column<T> setPartNameGenerator(com.vaadin.flow.function.SerializableFunction<T,String> partNameGenerator)
      Sets the function that is used for generating CSS part names for cells in this column. Returning null from the generator results in no custom part name being set. Multiple part names can be returned from the generator as space-separated.

      If Grid.setPartNameGenerator(SerializableFunction) is used together with this method, resulting part names from both methods will be effective.

      Parameters:
      partNameGenerator - the part name generator to set, not null
      Returns:
      this column
      Throws:
      NullPointerException - if partNameGenerator is null
      See Also:
    • setTooltipGenerator

      public Grid.Column<T> setTooltipGenerator(com.vaadin.flow.function.SerializableFunction<T,String> tooltipGenerator)
      Sets the function that is used for generating tooltip text for cells in this column. Returning null from the generator results in no tooltip being set.
      Parameters:
      tooltipGenerator - the tooltip generator to set, not null
      Returns:
      this column
      Throws:
      NullPointerException - if classNameGenerator is null
    • getClassNameGenerator

      public com.vaadin.flow.function.SerializableFunction<T,String> getClassNameGenerator()
      Gets the function that is used for generating CSS class names for cells in this column.
      Returns:
      the class name generator
    • getPartNameGenerator

      public com.vaadin.flow.function.SerializableFunction<T,String> getPartNameGenerator()
      Gets the function that is used for generating CSS part names for cells in this column.
      Returns:
      the part name generator
    • getTooltipGenerator

      public com.vaadin.flow.function.SerializableFunction<T,String> getTooltipGenerator()
    • isRowHeader

      public boolean isRowHeader()
      Gets whether cells in this column should be announced as row headers.
      Returns:
      whether cells in this column should be announced as row headers.
    • setRowHeader

      public Grid.Column<T> setRowHeader(boolean rowHeader)
      Sets whether cells in this column should be announced as row headers. When true, the cells for this column will be rendered with the role attribute set as rowheader, instead of the gridcell role value used by default.

      When a column is set as row header, its cells will be announced by screen readers while navigating to help user identify the current row as uniquely as possible.

      Parameters:
      rowHeader - whether cells in this column should be announced as row headers
    • getBottomLevelColumn

      protected Grid.Column<?> getBottomLevelColumn()
      Gets the <vaadin-grid-column> component that is a child of this component, or this component in case this is a bottom level <vaadin-grid-column> component. This method should be called only on components which have only one such bottom-level column (not on ColumnGroups with multiple children).
      Returns:
      the bottom column component
    • addDataGenerator

      protected com.vaadin.flow.shared.Registration addDataGenerator(com.vaadin.flow.data.provider.DataGenerator<T> dataGenerator)
    • _getSortOrderProvider

      protected SortOrderProvider _getSortOrderProvider()
    • _getEditorComponentCallback

      protected com.vaadin.flow.function.SerializableFunction<T,? extends com.vaadin.flow.component.Component> _getEditorComponentCallback()
    • _getComparator

      protected com.vaadin.flow.function.SerializableComparator<T> _getComparator()
    • getGrid

      public Grid<?> getGrid()
      Gets the owner of this column.
      Returns:
      the grid which owns this column
    • setVisible

      public void setVisible(boolean visible)

      Note that column related data is sent to the client side even if the column is invisible. Use Grid.removeColumn(Column) to remove column (or don't add the column all) and avoid sending extra data.

      Overrides:
      setVisible in class com.vaadin.flow.component.Component
      See Also:
    • getHeaderText

      public String getHeaderText()
      Returns the header text of the column.
      Returns:
      the header text
    • setHeaderText

      protected void setHeaderText(String text)
    • getFooterText

      public String getFooterText()
      Returns the footer text of the column.
      Returns:
      the footer text
    • setFooterText

      protected void setFooterText(String text)
    • getHeaderComponent

      public com.vaadin.flow.component.Component getHeaderComponent()
      Returns the header component of the column.
      Returns:
      the header component
    • setHeaderComponent

      protected void setHeaderComponent(com.vaadin.flow.component.Component component)
    • getFooterComponent

      public com.vaadin.flow.component.Component getFooterComponent()
      Returns the footer component of the column.
      Returns:
      the footer component
    • setFooterComponent

      protected void setFooterComponent(com.vaadin.flow.component.Component component)
    • moveHeaderContent

      protected void moveHeaderContent(io.jmix.groupgridflowui.kit.vaadin.grid.AbstractColumn<?> otherColumn)
      Moves the current header content, either a text or a component, to a different column or column group. Also clears the content of this column.
      Parameters:
      otherColumn - the column or group to move the content to
    • moveFooterContent

      protected void moveFooterContent(io.jmix.groupgridflowui.kit.vaadin.grid.AbstractColumn<?> otherColumn)
      Moves the current footer content, either a text or a component, to a different column or column group. Also clears the content of this column.
      Parameters:
      otherColumn - the column or group to move the content to
    • updateSortingIndicators

      protected void updateSortingIndicators(boolean sortable)
      Updates this component to either have sorting indicators according to the sortable state of the underlying column, or removes the sorting indicators.
      Parameters:
      sortable - true to have sorting indicators if the column is sortable, false to not have sorting indicators
    • setSortingIndicators

      protected void setSortingIndicators(boolean sortingIndicators)
      Sets this component to show sorting indicators or not.
      Parameters:
      sortingIndicators - true to show sorting indicators, false to remove them
    • hasSortingIndicators

      protected boolean hasSortingIndicators()
    • getBottomChildColumns

      protected List<Grid.Column<?>> getBottomChildColumns()
      Gets recursively the child components of this component that are instances of Column.
      Returns:
      the Column children of this component
    • setResizable

      default Grid.Column<T> setResizable(boolean resizable)
      When set to true, the column is user-resizable. By default this is set to false.
      Parameters:
      resizable - whether to allow user resizing of this column
      Returns:
      this column, for method chaining
    • isResizable

      @Synchronize("resizable-changed") default boolean isResizable()
      Gets whether this column is user-resizable.
      Returns:
      whether this column is user-resizable
    • setFrozen

      default Grid.Column<T> setFrozen(boolean frozen)
      Sets this column's frozen state.

      Note: Columns are frozen in-place, freeze columns from left to right for a consistent outcome.

      Parameters:
      frozen - whether to freeze or unfreeze this column
      Returns:
      this column, for method chaining
    • isFrozen

      @Synchronize("frozen-changed") default boolean isFrozen()
      Gets the this column's frozen state.
      Returns:
      whether this column is frozen
    • setFrozenToEnd

      default Grid.Column<T> setFrozenToEnd(boolean frozenToEnd)
      Sets this column's frozen state.

      Note: Columns are frozen in-place, freeze columns from right to left for a consistent outcome.

      Parameters:
      frozenToEnd - whether to freeze or unfreeze this column
      Returns:
      this column, for method chaining
      Since:
      23.1
    • isFrozenToEnd

      @Synchronize("frozen-to-end-changed") default boolean isFrozenToEnd()
      Gets the this column's frozen state.
      Returns:
      whether this column is frozen to end
      Since:
      23.1
    • setTextAlign

      default Grid.Column<T> setTextAlign(ColumnTextAlign textAlign)
      Sets the column text align.
      Parameters:
      textAlign - the text alignment of the column. Setting it to null resets the alignment to the default value ColumnTextAlign.START.
      Returns:
      this column, for method chaining
    • getTextAlign

      @Synchronize("text-align-changed") default ColumnTextAlign getTextAlign()
      Gets the column text align. The default is ColumnTextAlign.START.
      Returns:
      the column text align, not null
    • setHeaderPartName

      default Grid.Column<T> setHeaderPartName(String headerPartName)
      Sets a custom part name for the header cell.
      Parameters:
      headerPartName - the part name to set
      Returns:
      this column, for method chaining
    • getHeaderPartName

      default String getHeaderPartName()
      Gets the custom part name of the header cell.
      Returns:
      the part name
    • setFooterPartName

      default Grid.Column<T> setFooterPartName(String footerPartName)
      Sets a custom part name for the footer cell.
      Parameters:
      footerPartName - the part name to set
      Returns:
      this column, for method chaining
    • getFooterPartName

      default String getFooterPartName()
      Gets the custom part name of the footer cell.
      Returns:
      the part name