Interface DataGridExporter
- All Known Implementing Classes:
AbstractDataGridExporter,ExcelExporter,JsonExporter
public interface DataGridExporter
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidaddColumnValueProvider(String columnId, Function<DataGridExporter.ColumnValueContext, Object> columnValueProvider) Adds a function to get value from the column.voidexportDataGrid(Downloader downloader, com.vaadin.flow.component.grid.Grid<Object> dataGrid, ExportMode exportMode) downloaddataGridcontent viadownloadergetColumnValueProvider(String columnId) getLabel()voidremoveColumnValueProvider(String columnId) Removes an column value provider function by column id.voidsetFileName(String fileName)
-
Method Details
-
setFileName
-
exportDataGrid
void exportDataGrid(Downloader downloader, com.vaadin.flow.component.grid.Grid<Object> dataGrid, ExportMode exportMode) downloaddataGridcontent viadownloader -
getLabel
String getLabel()- Returns:
- exporter label
-
addColumnValueProvider
void addColumnValueProvider(String columnId, Function<DataGridExporter.ColumnValueContext, Object> columnValueProvider) Adds a function to get value from the column.- Parameters:
columnId- column idcolumnValueProvider- column value provider function
-
removeColumnValueProvider
Removes an column value provider function by column id.- Parameters:
columnId- column id
-
getColumnValueProvider
@Nullable Function<DataGridExporter.ColumnValueContext,Object> getColumnValueProvider(String columnId) - Parameters:
columnId- column id- Returns:
- column value provider function for the column id
-