If you want to allow users to download data in Excel without showing the data in a DataGrid, you can follow the steps below. The CSS hides a DataGrid while continuing to show its’ export icon.
- Create a datagrid that contains the data you want to export to Excel
- Switch on “Allow Export” in the DG properties
- Add a class to identify the DataGrid to the classes in the DG properties (I added ‘exportdatagrid’ in my example)
- Paste the CSS below into the StyleSheet of your application (if you don’t have a stylesheet in your Application Explorer you can enable it in the Application properties)
.exportdatagrid .data-grid-header .data-grid-search-container,
.exportdatagrid .data-grid-header .data-grid-quick-help-divider,
.exportdatagrid table {
display:none;
}