1. 程式人生 > >使GridView內容不換行

使GridView內容不換行

在下面事件中新增:
protected void gvAudit_RowCreated(object sender, GridViewRowEventArgs e)         {             for (int i = 0; i < e.Row.Cells.Count; i++)             {                 e.Row.Cells[i].Attributes.Add("style", "word-break :keep-all ; word-wrap:keep-all");             }         }