从Datagrid中包含的链接按钮到MS-Excel导出数据 [英] Export data from Datagrid containing the link button to MS-Excel

查看:154
本文介绍了从Datagrid中包含的链接按钮到MS-Excel导出数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个DataGrid,其中包含一个链接按钮进行编辑。

我要到DataGrid导出到Microsoft Excel(.xls的)格式。

我尝试使用 System.Web.UI.HtmlTextWriter 类,但随后给出了错误的渲染链接按钮。<​​/ P>

那么,有没有一种方法,我可以导出数据网格,而不从DataGrid中删除我的编辑按钮脱颖而出?

解决方案

参照下面的链接继续导出网格数据到Excel

HTTP://www.$c$cproject.com/KB/ ASPNET / ExportClassLibrary.aspx

I am having a Datagrid which contains a Link Button for Edit.

I want to export the Datagrid to Microsoft Excel(.xls) format.

I tried using the System.Web.UI.HtmlTextWriter Class but then it gives error for rendering the link button.

So is there a way where I can export the datagrid to excel without removing my edit button from the Datagrid?

解决方案

Refer following link to export grid data in to excel

http://www.codeproject.com/KB/aspnet/ExportClassLibrary.aspx

这篇关于从Datagrid中包含的链接按钮到MS-Excel导出数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆