Bug Report T1285429
Visible to All Users

GridView for WebForms - Data is not exported if ExportSelectedRowsOnly=true and there's a hyperlink column

created 9 days ago (modified 9 days ago)

Steps to reproduce:

  1. Open the attached project.
  2. Select all records.
  3. Press the export button.

Expected results:

The document has data.

Current results:

The document has no data.

Additional information:

If you remove either the ExportSelectedRowsOnly property or the hyperlink column, data appears.

Answers approved by DevExpress Support

created 3 days ago

When the ASPxGridViewExporter.ExportSelectedRowsOnly option is enabled, GridView filters data by key values before export. If Grid displays a key column (its FieldName is the same as Grid's KeyFieldName), the key column should display its value as is.

In the attached sample project, the key column's display text differs from the key value. When Grid filters data before export, the resulting collection is empty. That is why the issue occurs.

To resolve the issue, you can use one of the following solutions:

  1. Handle the BeforeExport event and reset the column's FilterMode before export;
  2. Don't use FilterMode in the key column;
  3. Ensure that the key column displays the key value without changes.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.