摘要: 准备工作就是可以分页的DataGridView,和两个按钮,一个用来导出当前页数据到Excel,一个用来导出全部数据到Excel没有使用SaveFileDialog,但却可以弹出保存对话框来先做导出当前页数据到Excel的DataGridView命名为dataGridView1#region 导出当前页到Excel中//按下导出按钮private void button7_Click(object sender, EventArgs e){ print(dataGridView1);}public void print(DataGridView dataGridView1){ //导出到exe 阅读全文
posted @ 2011-05-24 19:50 xfyn 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 方法一:在开发中有时并不希望页面被缓存,特别是弹出式窗体,可以使用一下方法处理,将页面设置为不缓存。方法一:在页面文件的HEAD中添加<HEAD><METAHTTP-EQUIV="Pragma"CONTENT="no-cache"><METAHTTP-EQUIV="Cache-Control"CONTENT="no-cache"><METAHTTP-EQUIV="Expires"CONTENT="0"></HEAD> 阅读全文
posted @ 2011-05-24 17:31 xfyn 阅读(342) 评论(0) 推荐(0) 编辑
摘要: html代码: <asp:DataGrid id="DataGrid1" runat="server" AutoGenerateColumns="False" onitemcreated="DataGrid1_ItemCreated" onitemdatabound="DataGrid1_ItemDataBound"> <Columns> <asp:TemplateColumn> <ItemTemplate> <asp:CheckBox Ru 阅读全文
posted @ 2011-05-24 08:46 xfyn 阅读(220) 评论(0) 推荐(0) 编辑