Class CrudGrid<E>

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.grid.Grid<E>
com.vaadin.flow.component.crud.CrudGrid<E>
Type Parameters:
E - the bean type
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<Grid<E>>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<Grid<E>>, com.vaadin.flow.component.FocusNotifier<Grid<E>>, 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<Grid<E>,GridSortOrder<E>>, com.vaadin.flow.data.provider.HasDataGenerators<E>, com.vaadin.flow.data.provider.HasDataView<E,Void,GridDataView<E>>, com.vaadin.flow.data.provider.HasLazyDataView<E,Void,GridLazyDataView<E>>, com.vaadin.flow.data.provider.HasListDataView<E,GridListDataView<E>>, Serializable

public class CrudGrid<E> extends Grid<E>
A simple grid implementation for Crud that allows searching and sorting backed by a data provider.
See Also:
  • Constructor Details

    • CrudGrid

      public CrudGrid(Class<E> beanType, boolean enableDefaultFilters)
      Instantiates a new CrudGrid for the supplied bean type.
      Parameters:
      beanType - the bean type
      enableDefaultFilters - true to enable filtering or false to disable
  • Method Details

    • getFilter

      public CrudFilter getFilter()
      Gets the filter applied to this grid
      Returns:
      the filter
    • getDataProvider

      public com.vaadin.flow.data.provider.DataProvider<E,?> getDataProvider()
      Gets the data provider set to the grid.
      Overrides:
      getDataProvider in class Grid<E>
      Returns:
      the data provider of this grid, not null
    • setDataProvider

      public void setDataProvider(com.vaadin.flow.data.provider.DataProvider<E,?> dataProvider) throws IllegalArgumentException
      Sets a DataProvider<E, CrudFilter>
      Overrides:
      setDataProvider in class Grid<E>
      Parameters:
      dataProvider - a DataProvider
      Throws:
      IllegalArgumentException - if the supplied data provider is not a DataProvider<E, CrudFilter>
      See Also: