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
Property Value
Type | Default | Description |
---|---|---|
Boolean | false |
|
Property Paths
You can access this nested property as listed below:
Object Type | Path to ExportSelectedRowsOnly |
---|---|
ASPxGridView |
|
Remarks
Set the ExportSelectedRowsOnly
property to true
to export selected rows only.
<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.