Solved

Export Grid view problem

Posted on 2008-10-13
3
231 Views
Last Modified: 2013-12-17
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
0
Comment
Question by:introlux
3 Comments
 
LVL 20

Expert Comment

by:informaniac
ID: 22701902
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
 
LVL 8

Accepted Solution

by:
tiagosalgado earned 500 total points
ID: 22701910
Instead of Visible = false/true, use gridview1.style.add("visibility","hidden") and to show it gridview1.style.add("visibility","visible").
0
 

Author Closing Comment

by:introlux
ID: 31407054
PERFECT!! I guess this allows the gridview to be rendered and exported :-)
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question