MVCxGridExportSettings.BeforeExport Property
Enables you to perform custom actions before the grid content is exported.
Namespace: DevExpress.Web.Mvc
Assembly: DevExpress.Web.Mvc5.v24.1.dll
NuGet Package: DevExpress.Web.Mvc5
Declaration
Property Value
Type | Description |
---|---|
ASPxGridBeforeExportEventHandler | An EventHandler method to which custom processing is delegated. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to BeforeExport |
---|---|
GridSettingsBase |
|
Remarks
The following code snippet illustrates how to use the BeforeExport
property.
settings.SettingsExport.BeforeExport = (sender, e) => {
MVCxGridView gridView = sender as MVCxGridView;
// Hides the Action column
gridView.Columns["Action"].Visible = false;
};
Note
Note that the BeforeExport
property is not in effect if you use the CreatePrintableObject(GridViewSettings, Object) method. Instead, use the GridViewExtension.ExportTo[FormatName]
methods.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the BeforeExport property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.