Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
UltraWebGrid, paging, and Excel export
posted

When I export data from a paged UltraWebGrid to Excel (using the UltraWebGridExcelExporter), I find that, after doing the export, paging on the grid no longer works.  After doing the export, if I click on a page number to navigate to a new page in the grid, I receive a page not found error.

I am guessing that the reason this is happening is that, the UltraWebGridExcelExporter causes a POST event to happen when it exports the data.  Still, I am sure there is a way to get around this.  How do I enable grid paging to continue to work after doing an export?

 

 

Parents
No Data
Reply
  • 22852
    Offline posted

    Hello,

    Typically when you do an export, the POST is made to the server for the page containing the grid and the UltraWebGridExcelExporter will change the response to be the excel file and this is sent back to the client.  Since this doesn't affect the state of the page on the client I would expect paging to still work normally.

    Since view state isn't affected by exporting to Excel, I suspect that the state on the server is changing, possibly by logic in your application that happens during the processing of the request where you exporting the WebGrid to Excel.

    Are you using session (or any other server side state management) to store anything that would the data available to the grid?  How is data being bound to the WebGrid?  Are you using InitializeDataSource?  Are you using any LoadOnDemand functionality in the WebGrid?

    Please let me know more details about what is happening on the server or how you have set up the grid.

    Let me know if you have any questions with this matter.

Children
No Data