Class VGrid<T>

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.grid.Grid<T>
org.vaadin.firitin.components.grid.VGrid<T>
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.grid.Grid<T>>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<com.vaadin.flow.component.grid.Grid<T>>, com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.grid.Grid<T>>, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, com.vaadin.flow.data.event.SortEvent.SortNotifier<com.vaadin.flow.component.grid.Grid<T>, com.vaadin.flow.component.grid.GridSortOrder<T>>, com.vaadin.flow.data.provider.HasDataGenerators<T>, com.vaadin.flow.data.provider.HasDataView<T, Void, com.vaadin.flow.component.grid.dataview.GridDataView<T>>, com.vaadin.flow.data.provider.HasLazyDataView<T, Void, com.vaadin.flow.component.grid.dataview.GridLazyDataView<T>>, com.vaadin.flow.data.provider.HasListDataView<T, com.vaadin.flow.component.grid.dataview.GridListDataView<T>>, Serializable, FluentAttachNotifier<VGrid<T>>, FluentBlurNotifier<com.vaadin.flow.component.grid.Grid<T>, VGrid<T>>, FluentComponent<VGrid<T>>, FluentDetachNotifier<VGrid<T>>, FluentFocusable<com.vaadin.flow.component.grid.Grid<T>, VGrid<T>>, FluentFocusNotifier<com.vaadin.flow.component.grid.Grid<T>, VGrid<T>>, FluentHasSize<VGrid<T>>, FluentHasStyle<VGrid<T>>, FluentHasTheme<VGrid<T>>
Direct Known Subclasses:
GridMultiSelect, GridSelect, PagingGrid, TreeTable

public class VGrid<T> extends com.vaadin.flow.component.grid.Grid<T> implements FluentComponent<VGrid<T>>, FluentHasStyle<VGrid<T>>, FluentHasSize<VGrid<T>>, FluentFocusable<com.vaadin.flow.component.grid.Grid<T>, VGrid<T>>, FluentHasTheme<VGrid<T>>
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    An interface to configure formatting of all data cells in the Grid.
    static interface 
    Used to assign Style rules to row cells.
    static class 
     

    Nested classes/interfaces inherited from class com.vaadin.flow.component.grid.Grid

    com.vaadin.flow.component.grid.Grid.AbstractGridExtension<T>, com.vaadin.flow.component.grid.Grid.Column<T>, com.vaadin.flow.component.grid.Grid.DataCommunicatorBuilder<T,U>, com.vaadin.flow.component.grid.Grid.MultiSortPriority, com.vaadin.flow.component.grid.Grid.NestedNullBehavior, com.vaadin.flow.component.grid.Grid.SelectionMode, com.vaadin.flow.component.grid.Grid.SpringData, com.vaadin.flow.component.grid.Grid.UpdateQueue

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier

    com.vaadin.flow.component.BlurNotifier.BlurEvent<C>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier

    com.vaadin.flow.component.FocusNotifier.FocusEvent<C>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    VGrid(int pageSize)
     
    VGrid(Class<T> beanType)
     
    VGrid(Class<T> beanType, boolean autoCreateColumns)
    Creates a new Grid with given bean type.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected <C extends com.vaadin.flow.component.grid.Grid.Column<T>>
    C
    addColumn(com.vaadin.flow.function.ValueProvider<T,?> valueProvider, BiFunction<com.vaadin.flow.data.renderer.Renderer<T>, String, C> columnFactory)
     
    com.vaadin.flow.component.grid.Grid.Column<T>
    addColumn(String propertyName)
     
    final void
    addColumns(PropertyRef<T,?>... properties)
    Adds columns for the given properties, using method references to their getters instead of property name strings.
    Adds a column for the given property, using a method reference to its getter instead of a property name string:
    protected void
    autoConfigureFromGetterReference(com.vaadin.flow.component.grid.Grid.Column<T> column, com.vaadin.flow.function.ValueProvider<T,?> valueProvider)
    If the given value provider is a method reference to a getter, configures the column like addColumn(String) would: the property name becomes the column key, the property caption becomes the header and a column of a Comparable property becomes sortable.
    void
     
    protected List<tools.jackson.databind.introspect.BeanPropertyDefinition>
     
    protected List<String>
     
    Finds the column of the given property, using a method reference to its getter instead of a property name string.
    protected BiFunction<com.vaadin.flow.data.renderer.Renderer<T>, String, com.vaadin.flow.component.grid.Grid.Column<T>>
     
    hideProperties(String... propertyNamesToHide)
    Hides given columns.
    final VGrid<T>
    hideProperties(PropertyRef<T,?>... propertiesToHide)
    Hides given columns, using method references to the getters instead of property name strings.
    boolean
     
    void
    Removes the column of the given property, using a method reference to its getter instead of a property name string.
    void
    Deprecated.
    Note, with lazy loaded content, calling this method may cause performance issues
    void
    setAutoConfigureFromGetterReferences(boolean autoConfigureFromGetterReferences)
    Defines whether columns added with a method reference to a getter, like grid.addColumn(Person::getFirstName), are configured with the key, header and sortability of that property.
    static void
    Defines the default of setAutoConfigureFromGetterReferences(boolean) for grids created after this call.
    final void
    setColumnOrder(PropertyRef<T,?>... properties)
    Sets the order of the columns, using method references to the getters instead of property name strings.
    void
    setColumns(String... propertyNames)
     
    final void
    setColumns(PropertyRef<T,?>... properties)
    Configures the columns shown by the grid, using method references to the getters instead of property name strings:
    <C extends com.vaadin.flow.component.Component>
    VGrid<T>
    setComponentRenderer(String columnKey, com.vaadin.flow.function.ValueProvider<T,C> componentProvider)
    Replaces the way the column with the given key is rendered, leaving everything else about the column as it is.
    <C extends com.vaadin.flow.component.Component>
    VGrid<T>
    setComponentRenderer(PropertyRef<T,?> property, com.vaadin.flow.function.ValueProvider<T,C> componentProvider)
    Replaces the way the column of the given property is rendered, leaving everything else about the column as it is: its position among the other columns, its key, header, width and sorting all stay put.
    setDataProvider(com.vaadin.flow.data.provider.CallbackDataProvider.FetchCallback<T,Void> fetchCallback, com.vaadin.flow.data.provider.CallbackDataProvider.CountCallback<T,Void> countCallback)
     
    setRenderer(String columnKey, com.vaadin.flow.data.renderer.Renderer<T> renderer)
    Replaces the renderer of the column with the given key, leaving everything else about the column as it is.
    setRenderer(PropertyRef<T,?> property, com.vaadin.flow.data.renderer.Renderer<T> renderer)
    Replaces the renderer of the column of the given property, leaving everything else about the column as it is.
    final void
    setSortableColumns(PropertyRef<T,?>... properties)
    Makes the columns of the given properties sortable, using method references to their getters instead of property name strings.
    Defines a formatter used for all basic data columns.
    Adds a Vaadin 3,4,5,6,7,8 style column selector.
     
    withItems(T... items)
     
    withProperties(String... propertyNames)
     
    final VGrid<T>
    withProperties(PropertyRef<T,?>... properties)
    Configures the columns shown by the grid, using method references to the getters instead of property name strings:
    Adds a strategy to style cells based on rows.
    withSelectionMode(com.vaadin.flow.component.grid.Grid.SelectionMode selectionMode)
     
    withSelectionModel(com.vaadin.flow.component.grid.GridSelectionModel<T> selectionModel, com.vaadin.flow.component.grid.Grid.SelectionMode selectionMode)
     
    withThemeVariants(com.vaadin.flow.component.grid.GridVariant... variants)
     

    Methods inherited from class com.vaadin.flow.component.grid.Grid

    addCellFocusListener, addColumn, addColumn, addColumn, addColumn, addColumn, addColumnReorderListener, addColumnResizeListener, addColumns, addComponentColumn, addContextMenu, addDataGenerator, addDragEndListener, addDragStartListener, addDropListener, addFirstHeaderRow, addItemClickListener, addItemDoubleClickListener, addSelectionListener, addSortListener, addThemeVariants, addValueProvider, appendFooterRow, appendHeaderRow, asMultiSelect, asSingleSelect, compareMaybeComparables, configureBeanType, createColumn, createColumnId, createDefaultArrayUpdater, createEditor, createSortingComparator, deselect, deselectAll, getAriaLabel, getArrayUpdater, getBeanType, getColumnByInternalId, getColumnByKey, getColumnLayers, getColumnRendering, getColumns, getDataCommunicator, getDataProvider, getDefaultHeaderRow, getDragFilter, getDropFilter, getDropMode, getEditor, getEmptyStateComponent, getEmptyStateText, getFooterRows, getGenericDataView, getHeaderRows, getLazyDataView, getListDataView, getNestedNullBehavior, getPageSize, getPartNameGenerator, getPropertySet, getSelectedItems, getSelectionMode, getSelectionModel, getSelectionPreservationMode, getSortOrder, getTooltipPosition, getUniqueKeyProperty, getUniqueKeyProvider, initConnector, insertColumnLayer, isAllRowsVisible, isColumnReorderingAllowed, isDetailsVisible, isDetailsVisibleOnClick, isMultiSort, isRowsDraggable, isTooltipMarkdownEnabled, onAttach, onDataProviderChange, onDetach, onEnabledStateChanged, prependFooterRow, prependHeaderRow, recalculateColumnWidths, refreshViewport, removeAllColumns, removeAllFooterRows, removeAllHeaderRows, removeColumn, removeColumnByKey, removeColumnLayer, removeColumns, removeFooterRow, removeHeaderRow, removeThemeVariants, scheduleScrollExecution, scrollToColumn, scrollToColumn, scrollToEnd, scrollToIndex, scrollToStart, select, setAllRowsVisible, setAriaLabel, setColumnKey, setColumnOrder, setColumnOrder, setColumnRendering, setColumnReorderingAllowed, setDataProvider, setDefaultMultiSortPriority, setDetailsVisible, setDetailsVisibleOnClick, setDragDataGenerator, setDragFilter, setDropFilter, setDropMode, setEmptyStateComponent, setEmptyStateText, setItemDetailsRenderer, setItems, setItems, setItems, setItems, setItemSelectableProvider, setItemsPageable, setItemsPageable, setMultiSort, setMultiSort, setMultiSort, setMultiSort, setNestedNullBehavior, setPageSize, setPartNameGenerator, setRowsDraggable, setSelectionDragDetails, setSelectionMode, setSelectionModel, setSelectionPreservationMode, setSortableColumns, setTooltipGenerator, setTooltipMarkdownEnabled, setTooltipPosition, setUniqueKeyProperty, setUniqueKeyProvider, sort, updateSelectionModeOnClient

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

    addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible

    Methods inherited from class 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.BlurNotifier

    addBlurListener

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

    addDetachListener

    Methods inherited from interface FluentAttachNotifier

    withAttachListener

    Methods inherited from interface FluentBlurNotifier

    withBlurListener

    Methods inherited from interface FluentComponent

    navigate, setId, setVisible, withId, withVisible

    Methods inherited from interface FluentDetachNotifier

    withDetachListener

    Methods inherited from interface FluentFocusable

    withTabIndex

    Methods inherited from interface FluentFocusNotifier

    withFocusListener

    Methods inherited from interface FluentHasStyle

    getStyle, withAddedClassName, withClassName, withStyle

    Methods inherited from interface FluentHasTheme

    withThemeNames

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

    addFocusShortcut, blur, focus, getTabIndex, setTabIndex

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

    addFocusListener

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

    getElement

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

    bindEnabled, isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.data.provider.HasLazyDataView

    setItems, setItems

    Methods inherited from interface com.vaadin.flow.data.provider.HasListDataView

    setItems, setItems

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

    bindHeight, bindWidth, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

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

    addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

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

    addThemeName, addThemeNames, bindThemeName, bindThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName
  • Constructor Details

    • VGrid

      public VGrid()
    • VGrid

      public VGrid(int pageSize)
    • VGrid

      public VGrid(Class<T> beanType)
    • VGrid

      public VGrid(Class<T> beanType, boolean autoCreateColumns)
      Creates a new Grid with given bean type.
      Parameters:
      beanType - the bean/record type
      autoCreateColumns - if true, columns are created automatically for all introspected properties
  • Method Details

    • getBeanPropertyDefinitions

      protected List<tools.jackson.databind.introspect.BeanPropertyDefinition> getBeanPropertyDefinitions()
    • getBeanPropertyNames

      protected List<String> getBeanPropertyNames()
    • focus

      public void focus()
      Specified by:
      focus in interface com.vaadin.flow.component.Focusable<T>
    • getDefaultColumnFactory

      protected BiFunction<com.vaadin.flow.data.renderer.Renderer<T>, String, com.vaadin.flow.component.grid.Grid.Column<T>> getDefaultColumnFactory()
      Overrides:
      getDefaultColumnFactory in class com.vaadin.flow.component.grid.Grid<T>
    • withSelectionMode

      public VGrid<T> withSelectionMode(com.vaadin.flow.component.grid.Grid.SelectionMode selectionMode)
    • withSelectionModel

      public VGrid<T> withSelectionModel(com.vaadin.flow.component.grid.GridSelectionModel<T> selectionModel, com.vaadin.flow.component.grid.Grid.SelectionMode selectionMode)
    • withProperties

      public VGrid<T> withProperties(String... propertyNames)
    • withProperties

      @SafeVarargs public final VGrid<T> withProperties(PropertyRef<T,?>... properties)
      Configures the columns shown by the grid, using method references to the getters instead of property name strings:
      grid.withProperties(Person::getFirstName, Person::getLastName);
      
      Parameters:
      properties - method references to the getters of the properties to show
      Returns:
      the grid for further configuration
    • hideProperties

      public VGrid<T> hideProperties(String... propertyNamesToHide)
      Hides given columns.
      Parameters:
      propertyNamesToHide - the property names/column keys to hide
      Returns:
      the grid for further configuration
    • hideProperties

      @SafeVarargs public final VGrid<T> hideProperties(PropertyRef<T,?>... propertiesToHide)
      Hides given columns, using method references to the getters instead of property name strings.
      Parameters:
      propertiesToHide - method references to the getters of the properties to hide
      Returns:
      the grid for further configuration
    • setColumns

      @SafeVarargs public final void setColumns(PropertyRef<T,?>... properties)
      Configures the columns shown by the grid, using method references to the getters instead of property name strings:
      grid.setColumns(Person::getFirstName, Person::getLastName);
      
      Nested properties can be referenced by chaining:
      grid.setColumns(PropertyRef.of(Person::getAddress).then(Address::getStreet));
      
      Parameters:
      properties - method references to the getters of the properties to show
    • addPropertyColumn

      public VGrid.VColumn<T> addPropertyColumn(PropertyRef<T,?> property)
      Adds a column for the given property, using a method reference to its getter instead of a property name string:
      grid.addPropertyColumn(Person::getFirstName).setHeader("Etunimi");
      
      Parameters:
      property - a method reference to the getter of the property to show
      Returns:
      the new column, for further configuration
    • setComponentRenderer

      public <C extends com.vaadin.flow.component.Component> VGrid<T> setComponentRenderer(PropertyRef<T,?> property, com.vaadin.flow.function.ValueProvider<T,C> componentProvider)
      Replaces the way the column of the given property is rendered, leaving everything else about the column as it is: its position among the other columns, its key, header, width and sorting all stay put. Handy for taking an otherwise standard grid and giving just one of its columns a hand-written presentation.
      VGrid<Person> grid = new VGrid<>(Person.class);
      grid.setComponentRenderer(Person::getEmail, person -> new Anchor("mailto:" + person.getEmail(), person.getEmail()));
      
      Note that the column keeps the comparator it was created with, so in memory sorting keeps working on the underlying property value even though the cell now shows a component.
      Type Parameters:
      C - the component type
      Parameters:
      property - a method reference to the getter of the property whose column to re-render
      componentProvider - creates the component to show for a row
      Returns:
      the grid for further configuration
      Throws:
      IllegalArgumentException - if this grid has no column for the property
    • setComponentRenderer

      public <C extends com.vaadin.flow.component.Component> VGrid<T> setComponentRenderer(String columnKey, com.vaadin.flow.function.ValueProvider<T,C> componentProvider)
      Replaces the way the column with the given key is rendered, leaving everything else about the column as it is.
      Type Parameters:
      C - the component type
      Parameters:
      columnKey - the key of the column to re-render
      componentProvider - creates the component to show for a row
      Returns:
      the grid for further configuration
      Throws:
      IllegalArgumentException - if this grid has no column with the key
      See Also:
    • setRenderer

      public VGrid<T> setRenderer(PropertyRef<T,?> property, com.vaadin.flow.data.renderer.Renderer<T> renderer)
      Replaces the renderer of the column of the given property, leaving everything else about the column as it is. The general form of setComponentRenderer(PropertyRef, ValueProvider), for cases where a LitRenderer or one of the built-in renderers is a better fit than a server side component.
      Parameters:
      property - a method reference to the getter of the property whose column to re-render
      renderer - the new renderer
      Returns:
      the grid for further configuration
      Throws:
      IllegalArgumentException - if this grid has no column for the property
    • setRenderer

      public VGrid<T> setRenderer(String columnKey, com.vaadin.flow.data.renderer.Renderer<T> renderer)
      Replaces the renderer of the column with the given key, leaving everything else about the column as it is.
      Parameters:
      columnKey - the key of the column to re-render
      renderer - the new renderer
      Returns:
      the grid for further configuration
      Throws:
      IllegalArgumentException - if this grid has no column with the key
      See Also:
    • addColumns

      @SafeVarargs public final void addColumns(PropertyRef<T,?>... properties)
      Adds columns for the given properties, using method references to their getters instead of property name strings.
      Parameters:
      properties - method references to the getters of the properties to show
    • setSortableColumns

      @SafeVarargs public final void setSortableColumns(PropertyRef<T,?>... properties)
      Makes the columns of the given properties sortable, using method references to their getters instead of property name strings.
      Parameters:
      properties - method references to the getters of the properties to make sortable
    • setColumnOrder

      @SafeVarargs public final void setColumnOrder(PropertyRef<T,?>... properties)
      Sets the order of the columns, using method references to the getters instead of property name strings. Note that all columns of the grid must be listed.
      Parameters:
      properties - method references to the getters of the properties, in the wanted order
      Throws:
      IllegalArgumentException - if any of the properties has no column in this grid
    • getColumnByKey

      public VGrid.VColumn<T> getColumnByKey(PropertyRef<T,?> property)
      Finds the column of the given property, using a method reference to its getter instead of a property name string.
      Parameters:
      property - a method reference to the getter of the property
      Returns:
      the column, or null if this grid has no column for the property
    • removeColumnByKey

      public void removeColumnByKey(PropertyRef<T,?> property)
      Removes the column of the given property, using a method reference to its getter instead of a property name string.
      Parameters:
      property - a method reference to the getter of the property
    • setColumns

      public void setColumns(String... propertyNames)
      Overrides:
      setColumns in class com.vaadin.flow.component.grid.Grid<T>
    • addColumn

      public com.vaadin.flow.component.grid.Grid.Column<T> addColumn(String propertyName)
      Overrides:
      addColumn in class com.vaadin.flow.component.grid.Grid<T>
    • withThemeVariants

      public VGrid<T> withThemeVariants(com.vaadin.flow.component.grid.GridVariant... variants)
    • setDataProvider

      public VGrid<T> setDataProvider(com.vaadin.flow.data.provider.CallbackDataProvider.FetchCallback<T,Void> fetchCallback, com.vaadin.flow.data.provider.CallbackDataProvider.CountCallback<T,Void> countCallback)
    • withItems

      public VGrid<T> withItems(Collection<T> items)
    • withItems

      public VGrid<T> withItems(T... items)
    • scrollToItem

      @Deprecated public void scrollToItem(T item)
      Deprecated.
      Note, with lazy loaded content, calling this method may cause performance issues
      Scrolls to the row presenting the given item.
      Overrides:
      scrollToItem in class com.vaadin.flow.component.grid.Grid<T>
      Parameters:
      item - the item to scroll to
    • withColumnSelector

      public VGrid<T> withColumnSelector()
      Adds a Vaadin 3,4,5,6,7,8 style column selector.
      Returns:
      the grid with column selector
    • addColumn

      protected <C extends com.vaadin.flow.component.grid.Grid.Column<T>> C addColumn(com.vaadin.flow.function.ValueProvider<T,?> valueProvider, BiFunction<com.vaadin.flow.data.renderer.Renderer<T>, String, C> columnFactory)
      Overrides:
      addColumn in class com.vaadin.flow.component.grid.Grid<T>
    • autoConfigureFromGetterReference

      protected void autoConfigureFromGetterReference(com.vaadin.flow.component.grid.Grid.Column<T> column, com.vaadin.flow.function.ValueProvider<T,?> valueProvider)
      If the given value provider is a method reference to a getter, configures the column like addColumn(String) would: the property name becomes the column key, the property caption becomes the header and a column of a Comparable property becomes sortable.

      Everything here is best effort. A value provider that can't be tied to a property, a plain lambda expression in particular, leaves the column untouched, as do a property name that is already taken by another column and a method reference that doesn't look like a getter of this grid's bean type.

      Parameters:
      column - the freshly created column
      valueProvider - the value provider the column was created from
    • setAutoConfigureFromGetterReferences

      public void setAutoConfigureFromGetterReferences(boolean autoConfigureFromGetterReferences)
      Defines whether columns added with a method reference to a getter, like grid.addColumn(Person::getFirstName), are configured with the key, header and sortability of that property. On by default.

      Turn this off to get the behaviour of Vaadin's raw Grid.addColumn(ValueProvider), where such a column has no key and no header at all.

      Parameters:
      autoConfigureFromGetterReferences - true to configure the columns, false to leave them bare
    • isAutoConfigureFromGetterReferences

      public boolean isAutoConfigureFromGetterReferences()
      Returns:
      true if getter reference columns are configured with their property's key, header and sortability
    • setAutoConfigureFromGetterReferencesByDefault

      public static void setAutoConfigureFromGetterReferencesByDefault(boolean autoConfigure)
      Defines the default of setAutoConfigureFromGetterReferences(boolean) for grids created after this call. Meant as an escape hatch for an application that has a lot of grids and wants the pre 3.8 behaviour.
      Parameters:
      autoConfigure - true to configure the columns, false to leave them bare
    • withCellFormatter

      public VGrid<T> withCellFormatter(VGrid.CellFormatter<T> formatter)
      Defines a formatter used for all basic data columns.
      Parameters:
      formatter - the formatter
      Returns:
      the VGrid for further configuration
    • withRowStyler

      public VGrid<T> withRowStyler(VGrid.RowStyler<T> rowStyler)
      Adds a strategy to style cells based on rows.
      Parameters:
      rowStyler - the RowStyler