復制代碼 代碼如下:
protected void AxGridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
//設置所有列不允許換行
//AxGridView1.Attributes.Add("style", "word-break:keep-all;word-wrap:false");
//設置所有列自動換行
AxGridView1.Attributes.Add("style", "word-break:break-all;word-wrap:break-word");
}