Export Grid view problem

Hi,

I have managed to export a gridview without a problem. The problem I am having is, that I do not want the gridview to show up from start up. Which i used gridview1.visible = false;

Later this is set to true. But then when the data is loaded etc. and I click on the export button, it exports no data! When I take off the visible false from page load, it all works fine.

Any idea how I can sort this problem

Regards,

introlux
introluxAsked:
Who is Participating?
 
tiagosalgadoConnect With a Mentor Commented:
Instead of Visible = false/true, use gridview1.style.add("visibility","hidden") and to show it gridview1.style.add("visibility","visible").
0
 
informaniacCommented:
Don't place the gridview in the design mode.

On click of the export button, just declare a temporary grid in the buttonclick method and then export this gridview to excel
0
 
introluxAuthor Commented:
PERFECT!! I guess this allows the gridview to be rendered and exported :-)
0
All Courses

From novice to tech pro — start learning today.