export
When client-side exporting is enabled, the grid toolbar contains the Export button ( ) that exports grid data to Excel. For details on exporting, refer to the Client-Side Exporting article.
allowExportSelectedData
When this option is set to true, a click on invokes a menu that contains the "Export selected rows" command.
See Also
- export.texts.exportSelectedRows - customizes the text of the "Export selected rows" command.
- selection.mode - enables selection in the widget.
customizeExcelCell
Name | Type | Description |
---|---|---|
backgroundColor |
The cell background color specified as a "#RRGGBBAA" value. |
|
component |
The widget's instance. |
|
fillPatternColor |
The foreground color of the cell fill pattern specified as a "#RRGGBBAA" value. |
|
fillPatternType | 'darkDown' | 'darkGray' | 'darkGrid' | 'darkHorizontal' | 'darkTrellis' | 'darkUp' | 'darkVertical' | 'gray0625' | 'gray125' | 'lightDown' | 'lightGray' | 'lightGrid' | 'lightHorizontal' | 'lightTrellis' | 'lightUp' | 'lightVertical' | 'mediumGray' | 'none' | 'solid' |
The cell fill pattern. |
font |
The cell font. |
|
gridCell |
A DataGrid cell that corresponds to the Excel cell. |
|
horizontalAlignment | 'center' | 'centerContinuous' | 'distributed' | 'fill' | 'general' | 'justify' | 'left' | 'right' |
The horizontal cell alignment. |
numberFormat |
The format that specifies how the cell value is displayed. |
|
value | | | |
The cell value. |
verticalAlignment | 'bottom' | 'center' | 'distributed' | 'justify' | 'top' |
The vertical cell alignment. |
wrapTextEnabled |
Specifies whether the cell text should be line-wrapped. |
The following table shows available fill patterns:
|
|
enabled
Enables the client-side exporting.
See Also
- columns[].allowExporting
excelWrapTextEnabled
When this option is not set, the value of the grid's wordWrapEnabled option is used.
proxyUrl
Specifies the URL of the server-side proxy that streams the resulting file to the end user to enable exporting in the Safari browser.
Generally, exporting is performed using client-side API in browsers. However, the Safari (integrated in Mac OS) browser does not implement an API for saving files. In this instance, the DataGrid widget can POST the content to a server-side proxy, which will stream the file back to the end user. To enable this functionality, set the export.proxyUrl option to the proxy, which will stream the file to the end user. When implementing the proxy, take the following information into account.
- Your proxy will receive a POST request with the following parameters in the request body: fileName, contentType (the MIME type of the file) and base64 (the base-64 encoded file content).
- The proxy should return the decoded file with the "Content-Disposition" header set to attachment; filename="
" .
The sample proxy implementation for ASPx-based and PHP-based web servers is described in the Set up a Server-Side Proxy article.