gridview 操作

控制表头不换行:
//设置不换行  
GridView1.Style.Add("word-break", "keep-all");
GridView1.Style.Add("word-wrap", "normal");

或者

//正常换行
GridView1.Attributes.Add("style", "word-break:keep-all;word-wrap:normal");
//下面这行是自动换行
GridView1.Attributes.Add("style", "word-break:break-all;word-wrap:break-word");

你可能感兴趣的:(GridView)