Back to Devexpress

GridViewExportMenuItemVisibility Class

aspnet-devexpress-dot-web-ca5f3da1.md

latest4.5 KB
Original Source

GridViewExportMenuItemVisibility Class

Contains settings that affect the visibility of Export submenu items in the row context menu.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class GridViewExportMenuItemVisibility :
    ASPxGridSettingsBase
vb
Public Class GridViewExportMenuItemVisibility
    Inherits ASPxGridSettingsBase

The following members return GridViewExportMenuItemVisibility objects:

Remarks

The ASPxGridView context menu implements the Export submenu that contains the following commands: ExportToCsv, ExportToPdf, ExportToRtf, ExportToDocx, ExportToXls, and ExportToXlsx.

Run Demo: Grid - Context Menu

To enable the Export menu, set the Visible property to true. Use the ContextMenuExpandRow and ContextMenuExpandRow properties to specify the item text and image.

aspx
<dx:ASPxGridView ID="Grid" runat="server" KeyFieldName="ProductID" DataSourceID="ProductsDataSource">
    <SettingsExport EnableClientSideExportAPI="true"/>
    <SettingsContextMenu Enabled="true">
        <RowMenuItemVisibility ExportMenu-Visible="true" />
    </SettingsContextMenu>
    ...

You can control the visibility of a particular export command in the Export submenu. Set a command’s visibility property to false to hide the corresponding item in the menu.

ItemVisibility Property
Export to PDFExportToPdf
Export to RTFExportToRtf
Export to DOCXExportToDocx
Export to CSVExportToCsv
Export to XLSExportToXls
Export to XLSXExportToXlsx

aspx
<dx:ASPxGridView ID="Grid" runat="server" KeyFieldName="ProductID" DataSourceID="ProductsDataSource">
    <SettingsExport EnableClientSideExportAPI="true"/>
    <SettingsContextMenu Enabled="true">
        <RowMenuItemVisibility>
            <ExportMenu Visible="true" ExportToCsv="false" ExportToRtf="false" ExportToDocx="false"/>
        </RowMenuItemVisibility>
    </SettingsContextMenu>
    ...

Implements

IStateManager

Inheritance

Object StateManager PropertiesBase ASPxGridSettingsBase GridViewExportMenuItemVisibility

See Also

GridViewExportMenuItemVisibility Members

Context Menu

Context Menu

Grid Context Menu Items

Export Grid View Data

DevExpress.Web Namespace