Bug Report B141605
Visible to All Users

AspxGridViewExporter doesn't export anymore after upgrading

created 15 years ago

After upgrading project to volume 2 I can't export data anymore. In my form I use gridview in combination with an objectdatasource.
All works fine during grid render, but unexpectly when i require export i see that the SelectMethod receive multiple requests the last instead having the SettingPager.PageSize value (20 in the attached example) receive 0.
As result the extraction is empty and only the grid header is render regardless of the format required.
Steps to Reproduce:
Load default.aspx and press the button to export data.
Actual Results:
Extraction is made only by grid header.
Expected Results:
Data extraction should include all the grid rows.

Show previous comments (1)
Serge (DevExpress Support) 15 years ago

    Hi adrii,
    Having researched the scenario, we found that the problem is indeed caused by the changes made to resolve the bug described in report ASPxGridViewExporter - It's impossible to export all the data from the grid, if the DataSourceForceStandardPaging property is set to True. Now, the ASPxGridView re-binds before export if its DataSourceForceStandardPaging="true", because it doesn't contain all data rows. To verify this, follow these steps:

    1. Run the sample and put a breakpoint in the GetCustomerCount() method.
    2. Click the Export button.
    3. The execution stops on the breakpoint - the ASPxGridView builds its hierarchy when the page is instantiated. customerCount = 20
    4. The breakpoint is reached again - the ASPxGridView re-binds to load all rows. customerCount = 0
      Please update the logic of your application so that the GetCustomerCount() method always returns the correct number of rows.
      Thanks,
      Serge
    AT AT
    Adriano Trevisan 15 years ago

      Hi Serge,
      my function return customerCount=0 in the second request (during export process) since MaxRecords parameter incoming in the select method is equal to 0.
      This parameter has always been understood as sort of "top" so 0 actually doesn't export any rows.
      Are you suggesting me to intend 0 as a kind of no limits?
      Thanks

      Serge (DevExpress Support) 15 years ago

        Yes, please.
        Regards,
        Serge

        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.