GridView 不换行

it2022-05-05  178

//在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

{

}

}

 

转载于:https://www.cnblogs.com/BBLY/p/3515803.html

相关资源:DirectX修复工具V4.0增强版

最新回复(0)