gridview固定列的宽度并且能换行

在RowCreated事件中添加
e.Row.Cells[6].Attributes.Add("style", "word-break :break-all ; word-wrap:break-word");

这样则会让你选定的列自动换行了 不过前提是要给列设置宽度
<asp:BoundField DataField="Memo" HeaderText="备注" >
<ItemStyle Width="20%" Wrap="True" />
</asp:BoundField>
前台这样写。 注意: Wrap="True" 啊!

上面只能对单一的列其作用。

下面是全局的,写到CSS里最好不过了。
GridView.Attributes.Add( "style ", "table-layout:fixed ")

原文地址:https://www.cnblogs.com/cnaspnet/p/1300363.html