Does the control need a datasource control

Jan 10, 2008 at 12:49 AM
I have tried it with a gridview bound to a datasource control and it works fine but when I used it on a gridview bound to a datasource control that has the selectcommand generated on code behind, it works fine but only the columns are exported to excel.
Coordinator
Jan 10, 2008 at 7:59 PM
Gau,
When the "Export" button is clicked, I internally call the "Gridview.Databind" method. So, please ensure that the gridview is bound to a datasource for the export to work properly.

Hope that helps!! If not, please send me your code and I will take a look at it.


Gau wrote:
I have tried it with a gridview bound to a datasource control and it works fine but when I used it on a gridview bound to a datasource control that has the selectcommand generated on code behind, it works fine but only the columns are exported to excel.

Coordinator
Jan 25, 2008 at 11:09 PM
I will be posting the next version of this control in the next few days. This will have a new event called "PreExport". You can do the "Databinding" during in the event and the control should export the data just fine. Thanks for your patience.



Gau wrote:
I have tried it with a gridview bound to a datasource control and it works fine but when I used it on a gridview bound to a datasource control that has the selectcommand generated on code behind, it works fine but only the columns are exported to excel.