由于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是要全部显示。该如何实现呢?
先谢谢各位了!