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
185
Refresh UltraWebGrid after PDF export
posted

Hi, I am using UltraWebGrid Version 8.2.20082.1000 on an ASP.NET 3.5 page with UpdatePanel. Grid is set to use LoadOnDemand=Xml and I have implemented the InitializeDataSource event in which the grid is DataBind.

I have a button on the page which fires a server-side event. Steps in codebehind event:

1. Create a new temporary UltraWebGrid (will be used to export grid data)

2. Copy selected rows to temp grid 

3. Delete selected rows from the database

4. Delete selected rows from the DisplayLayout

5. Export the temp grid

The rows get deleted properly from the database. The selected rows are exported fine and the user gets a prompt to open/save the exported file. The problem is that the grid on the client-side does not get refreshed after the export. The rows that I deleted are still visible in the grid until the next postback. I tried to call DataBind on the grid before and after the export but it did not help.

 

Thanks!

Parents
  • 55
    posted

     Hello,

     I actualy have the exact same problem with my grid only I am not creating a temporary grid and I am exporting to Excel not pdf. 

    I am using a checkbox column to select the rows that i want to delete from the database where the data resides. Once the user has selected all of the rows they wish to remove, the code steps through the grid and adds all of the rows that are checked to a list. That list is then passed as a parameter to a stored procedure which then updates the database. At this point, I have the same problem as you, since my grid is inside an update panel, the rows that were deleted are still on the page even after the database has been updated. I have to totally navigate away from the page (to another page in the application) and then return to the page in order to cause a postback and therefore see the updated grid without the rows that I deleted showing up...

    I was just wondering if you had come across a solution yet or not...

     

    Thanks!

Reply Children