Skip to main content
Tab

ASPxGridViewExportSettings.ExportSelectedRowsOnly Property

Specifies if only selected rows should be exported.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v25.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(false)]
public bool ExportSelectedRowsOnly { get; set; }

Property Value

Type Default Description
Boolean false

true to export the selected rows only; false to export all grid rows.

Property Paths

You can access this nested property as listed below:

Object Type Path to ExportSelectedRowsOnly
ASPxGridView
.SettingsExport .ExportSelectedRowsOnly

Remarks

Set the ExportSelectedRowsOnly property to true to export selected rows only.

Run Demo: Export Selected Records

<dx:ASPxGridView ID="grid" Crunat="server" DataSourceID="ProductsDataSource"
    AutoGenerateColumns="false" KeyFieldName="ProductID" >
    <SettingsExport ExportSelectedRowsOnly="true" />
    <Columns>
        <dx:GridViewCommandColumn ShowSelectCheckbox="true" />
        <dx:GridViewDataTextColumn FieldName="ProductName" />
        <dx:GridViewDataTextColumn FieldName="QuantityPerUnit" />
        <dx:GridViewDataTextColumn FieldName="UnitPrice">
    </Columns>
    <%--...--%>
</dx:ASPxGridView>

Note

If you enable the ExportSelectedRowsOnly property, check whether the control displays a key column (its FieldName should match the control’s KeyFieldName). If such a column is visible, it must display the exact key values (not custom texts), or the column’s FilterMode must be set to Value (default). Otherwise, the control is unable to determine and export selected rows.

See Also