解决方案 »
- 请教Button1按钮的问题
- ASP.NET怎么实现用表格发布的信息的分页啊?
- 关于treeview 与iframe结合使用的问题
- 今天服务器被黑,请大家帮帮忙,实在很急……
- 如何读取cookie
- 我新建的工程运行不了 是怎么回事?
- 请问:如何在asp.net(后台.cs程序) 中接受showModalDialog传过来的数组变量?请指教!!
- 哪位热心人帮帮我,近我做了一个asp.net+SQL的网站,在本地IIS上测试都正常运行,但是上传到服务器上用域名访问时却提示“无法找到该页!”。
- 高分求editplus的asp语法支持,自动完成文件
- 初学者问题:在asp.net里如何取得从上页传来的参数?
- 把asp Rewrite到aspx失败
- asp.net sitemap 问题
要么在你的Export方法中给gridview加上带框框的样式表
/// 导出gridview列表
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Export_Common(object sender,CommandEventArgs e)
{
string strCommandName = e.CommandName;
if (strCommandName=="Export")
{
if (this.gvwDataList.Rows.Count==0)
{
Alert("当前无数据导出!");
return;
}
int nDelIndex = this.gvwDataList.Columns.Count - 1;// 删除列
int nAllot = nDelIndex - 1;// 分配列
this.gvwDataList.Columns[nDelIndex].Visible = false;// 隐藏删除列
this.gvwDataList.Columns[nAllot].Visible = false;// 隐藏分配列
// 显示边框
for (int i = 0; i < nAllot; i++)
{
this.gvwDataList.Columns[i].HeaderStyle.BorderWidth = 1;
this.gvwDataList.Columns[i].ItemStyle.BorderWidth = 1;
}
// 导出Excel
CommonConst.ControlExport(this.gvwDataList,"申请记录_"+DateTime.Now.ToString("yyyyMMddHHmmss"));
this.gvwDataList.Columns[nDelIndex].Visible = false;// 显示删除列
this.gvwDataList.Columns[nAllot].Visible = false;// 显示分配列
// 隐藏边框
for (int i = 0; i < nAllot; i++)
{
this.gvwDataList.Columns[i].HeaderStyle.BorderWidth = 0;
this.gvwDataList.Columns[i].ItemStyle.BorderWidth = 0;
}
}
}