由于GridView的列数不固定,所以Gridview的AutoGenerateColumns属性为true在RowDataBound中使用如下方式均不行:
e.Row.Cells[25].Attributes.Add("style", "white-space: nowrap;");
e.Row.Cells[25].ToolTip = e.Row.Cells[25].Text.Trim().ToString(); e.Row.Cells[25].Wrap = false;
e.Row.Height = Unit.Pixel(10);
e.Row.Cells[25].Width = Unit.Pixel(10);但是不能用Substring截取,否则导出Excel的时候就不能全部显示用户要求在页面上固定大小,但是导出Excel是要全部显示。该如何实现呢?
先谢谢各位了!
e.Row.Cells[25].Attributes.Add("style", "white-space: nowrap;");
e.Row.Cells[25].ToolTip = e.Row.Cells[25].Text.Trim().ToString(); e.Row.Cells[25].Wrap = false;
e.Row.Height = Unit.Pixel(10);
e.Row.Cells[25].Width = Unit.Pixel(10);但是不能用Substring截取,否则导出Excel的时候就不能全部显示用户要求在页面上固定大小,但是导出Excel是要全部显示。该如何实现呢?
先谢谢各位了!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货