12.GridView一般换行与强制换行:效果图:
Code1
1protected void Page_Load(object sender, EventArgs e)
2{
3 //正常换行
4 GridView1.Attributes.Add("style", "word-break:keep-all;word-wrap:normal");
5 //下面这行是自动换行
6 GridView1.Attributes.Add("style", "word-break:break-all;word-wrap:break-word");
7 if (!IsPostBack)
8 {
9 bind();//调用数据绑定即可
10 }
11}