服务器之家:专注于服务器技术及软件下载分享
分类导航

PHP教程|ASP.NET教程|JAVA教程|ASP教程|

服务器之家 - 编程语言 - ASP.NET教程 - ASP.NET Datagridview自动换行的小例子

ASP.NET Datagridview自动换行的小例子

2019-11-15 13:43asp.net教程网 ASP.NET教程

这篇文章介绍了ASP.NET Datagridview自动换行的代码,有需要的朋友可以参考一下,希望对你有所帮助

代码如下:

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"); 
   } 

延伸 · 阅读

精彩推荐