ImportDataGrid

Hi,

Some question about ImportDataGrid. I want to simply the code, I want to export excel file same format as the datagrid. But my datagrid set allow paging. I try that the ImportDataGrid only export the data of the page. Can I export all data? or any idea of dont need to re-format again. Thanks

I think it’s impossible to export whole data in your datagrid because the datagrid only contains data on that show page. What’s the datasource of your datagrid? Is it a datatable? You can try to use ImportDataTable method.

My datasource of the datagrid is dataset. I select * from the table. I using the datagrid show partial field. And some field of data covert to some string in the TemplateColumn.
e.g. <%# getDescription(DataBinder.Eval(Container,“DataItem.resp_code”)) %>

How can I easy to do? thanks
because I am dummy of programme. Thanks
<%# nwtmusicAdmin.BusinessLogicLayer.Payment.getHSBC_qsiResponseDescription(DataBinder.Eval(Container,“DataItem.qsi_resp_code”)) %><%# nwtmusicAdmin.BusinessLogicLayer.Payment.getHSBC_qsiResponseDescription(DataBinder.Eval(Container,“DataItem.qsi_resp_code”)) %><%# nwtmusicAdmin.BusinessLogicLayer.Payment.getHSBC_qsiResponseDescription(DataBinder.Eval(Container,“DataItem.qsi_resp_code”)) %><%# nwtmusicAdmin.BusinessLogicLayer.Payment.getHSBC_qsiResponseDescription(DataBinder.Eval(Container,“DataItem.qsi_resp_code”)) %><%# nwtmusicAdmin.BusinessLogicLayer.Payment.getHSBC_qsiResponseDescription(DataBinder.Eval(Container,“DataItem.qsi_resp_code”)) %>

You can create a DataView based on your dataset and use Cells.ImportDataView method to export data to spreadsheets.