日期:2009-12-27  浏览次数:20421 次

在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"