Skip to main content
A newer version of this page is available. .

MVCxGridExportSettings.BeforeExport Property

Enables you to perform custom actions before the grid content is exported.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v20.2.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public ASPxGridBeforeExportEventHandler BeforeExport { get; set; }

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
CardViewSettings
.SettingsExport .BeforeExport
CardViewSettings<CardType>
.SettingsExport .BeforeExport
GridSettingsBase
.SettingsExport .BeforeExport
GridViewSettings
.SettingsExport .BeforeExport
GridViewSettings<RowType>
.SettingsExport .BeforeExport
VerticalGridSettings
.SettingsExport .BeforeExport
VerticalGridSettings<ColumnType>
.SettingsExport .BeforeExport

Remarks

The following code snippet illustrates how to use the BeforeExport property.

settings.SettingsExport.BeforeExport = (sender, e) => {  
    MVCxGridView gridView = sender as MVCxGridView;
    // your code
};

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.

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.

See Also