Thus spake the master programmer:
After three days without programming,
life becomes meaningless.
- The Zen of Programming

Tuesday, May 1, 2007

Gridviews, Excel and Ajax headaches

I'm working on a report that dumps out a gridview to excel. We are using the ajaxtoolkit, and I had wrapped the link to export the Gridview inside of an update panel with other various links to dynamicPdf reports. Well, unfortunately after a lot of searching, hair pulling and frustration. I found there is no way to contain the link inside an update panel because ajax raises an exception on the HttpResponse object. Bummer.

In the end, I guess it doesn't matter that much because I just have the spreadsheet save to the users desktop, and I don't display it inside of any panels.

If anyone has a work around for keeping the link inside the update panel, that would be great. I did find a function that would attempt parse the response string, and format it for ajax; however, I was never able to get beyond the errors.