A problem with beta version but not with alpha

May 30, 2008 at 7:47 PM
it's a great control, but i seem to have problems with the new beta control.. it only displays the headers of the gridview columns. the previous version (alpha) works just fine but it doesn't have the selective columns thing, which is what i need.. it also doesn't have the on pre export event that would give me the possibility to do it manually.

yes, also, it doesn't seem to "see" the data from the hidden fields (the alpha version i mean.. the working one). is it because you wanted them not to be exported to the xls file or is it a bug? but then again.. if it was the way you wanted, why would the header appear?

i'll be very gratefull for an explain.
thanks
Coordinator
Jun 1, 2008 at 2:21 AM
Let me explain one issue at a time. 

Displays only the header - if you are dynamically building the gridview [say applying a search criteria at runtime], then you need to do the same filtering in the "PreExport" event.

Selective Columns Thing - I am not sure what you are referring here.  In the Beta version, I have a new property that you can use to ignore few columns in the export.

Hidden fields - yes there is a bug.  The alternate approach would be for you to have an "Identical" Gridview on the page and set the "Visible" property to "False".  Set the "GridViewID" property of the ExportToExcel button to the "Hidden" gridview.

Thanks
Jun 1, 2008 at 2:24 PM
ok, thanks a lot, it works just fine now. i took your advice and repopulated the gridview in the preexport event.

one thing though. you should've been more explicit about the attribute that ignores the columns. i was trying for like a half an hour to make it work by introducing the header name of the column :) when i should've entered the 0-based index of the column.

thanks again, your control saved me a lot of time ;) keep up the good work