GridView 不换行
时间:2014-01-15 23:53:25
收藏:0
阅读:431
//在GV1_DataBound事件中加上:
protected void GV1_DataBound(object sender, EventArgs
e)
{
try
{
for (int j = 0; j < GV1.Rows.Count;
j++)
{
for (int i = 0; i < GV1.HeaderRow.Cells.Count - 1;
i++)
{
GV1.Rows[j].Cells[i].Text = "<nobr>" + GV1.Rows[j].Cells[i].Text +
"</nobr>";
}
}
}
catch
{
}
}
原文:http://www.cnblogs.com/BBLY/p/3515803.html
评论(0)