Dream Will Come True
梦想从这里开始

在页面加入属性:style =" word-break :break-all ; word-wrap:break-word "  (table或div 等的属性里)

或设置
        protected void GridView1_DataRowBound(object o, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                //设置要换行的模板列
               e.Row.Cells[0].Attributes.Add("style", "word-break :break-all ; word-wrap:break-word");
                e.Row.Cells[1].Attributes.Add("style", "word-break :break-all ; word-wrap:break-word");
            }
        }
posted on 2007-04-05 09:45  钻钻  阅读(1054)  评论(0)    收藏  举报