This example demonstrates RadGrid's Export to Word / CSV
formats. There are two ways to integrate the exporting functionality in RadGrid.
- Codeless (built-in buttons in the CommandItem) - using the CommandItemSettings
- Manually using the API - we have both server and client methods that can trigger the export
You can configure the exporting settings for the grid through the RadGrid.ExportSettingssection. Most commonly used settings include:
- FileName - a string specifying the name (without the extension) of the file that will be created. The file extension is automatically added based on the method that is used
- ExportOnlyData - determines whether only data will be exported
- IgnorePaging - specifies whether all records will be exported or merely those on the current page
- OpenInNewWindow - opens the exported grid in a new instead of the same page
- UseItemStyles - gives you the ability to apply the item styles to the exported file
Note that the exporting feature of the control works with regular postbacks only. Therefore in this demo the new RadAjaxPanel's "PostBackControls" porperty is used for listing the controls that should be excluded
from perfoming ajax requests. This property is available for the RadAjaxManager control also sinse Q1 2016 release.