1、不换行:
word-break:keep-all;word-wrap:normal
2、换行:
word-break:break-all;word-wrap:break-word
以上的换行只支持英文,当标题中包含有中文时并不好用。
3、如果标题中含有中文的,只能在GridView的RowDataBound事件中添加代码,如下:

代码
if (e.Row.RowType == DataControlRowType.Header)
{
    e.Row.Cells[
0].Text = "<nobr>操作用户</nobr>";
            e.Row.Cells[
1].Text = "<nobr>批次名称</nobr>";
            e.Row.Cells[
2].Text = "<nobr>文件名称</nobr>";
            e.Row.Cells[
3].Text = "<nobr>档案类型</nobr>";
            e.Row.Cells[
4].Text = "<nobr>字段名称</nobr>";
            e.Row.Cells[
5].Text = "<nobr>字段值</nobr>";
            e.Row.Cells[
6].Text = "<nobr>字段长度</nobr>";
            e.Row.Cells[
7].Text = "<nobr>所在流程</nobr>";
            e.Row.Cells[
8].Text = "<nobr>开始时间</nobr>";
            e.Row.Cells[
9].Text = "<nobr>结束时间</nobr>";
            e.Row.Cells[
10].Text = "<nobr>录入版本</nobr>";            
}       

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-23
  • 2021-06-28
  • 2022-01-28
  • 2021-08-12
  • 2021-12-11
相关资源
相似解决方案