Back to Devexpress

ASPxGridView.StylesExport Property

aspnet-devexpress-dot-web-dot-aspxgridview-8dd4c2bd.md

latest2.3 KB
Original Source

ASPxGridView.StylesExport Property

Provides access to the style settings defining the appearance of the exported document.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public GridViewExportStyles StylesExport { get; }
vb
Public ReadOnly Property StylesExport As GridViewExportStyles

Property Value

TypeDescription
GridViewExportStyles

A GridViewExportStyles object that contains style settings.

|

Remarks

aspx
<dx:ASPxGridView ID="grid" runat="server" ... >
    ...
    <StylesExport>
        <Header BackColor="Green" />
    </StylesExport>
</dx:ASPxGridView>

Note that export properties of grid columns have a greater priority than the control’s export properties. Use the ExportCellStyle property to customize cell export styles.

aspx
<dx:ASPxGridView ID="grid" runat="server" ... >
    ...
    <Columns>
        <dx:GridViewDataColumn FieldName="ProductID">
            <ExportCellStyle BorderSize="0" />
        </dx:GridViewDataColumn>
    </Columns>    
</dx:ASPxGridView>

Limitation

The StylesExport property has no effect in DataAware Mode. Use either the ExportCellStyle property at the column level or the XlsExportOptionsEx.CustomizeCell / XlsxExportOptionsEx.CustomizeCell event instead.

See Also

ASPxGridView Class

ASPxGridView Members

DevExpress.Web Namespace