ASPxGridViewExportSettings.FileName Property
Specifies the name of the exported file.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | The target file name. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to FileName |
---|---|
ASPxGridView |
|
Remarks
Use the FileName
property to specify the name of the exported file.
<dx:ASPxGridView ID="grid" runat="server" DataSourceID="CustomerReportsDataSource">
<SettingsExport FileName="exported-grid" />
<%--...--%>
</dx:ASPxGridView>
To specify the name dynamically at runtime, handle the BeforeExport event and assign the desired file name to the FileName
property.
<dx:ASPxGridView ID="grid" runat="server" DataSourceID="CustomerReportsDataSource"
OnBeforeExport="grid_BeforeExport"/>
protected void grid_BeforeExport(object sender, DevExpress.Web.ASPxGridBeforeExportEventArgs e) {
grid.SettingsExport.FileName = "My File " + DateTime.Now;
}
See Also