GridView 固定行高

  protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)
    {
       
for (int i = 0; i < e.Row.Cells.Count; i++)
        {
            e.Row.Cells[i].Attributes.Add(
"style", "white-space: nowrap;");
            e.Row.Height
= Unit.Pixel(100);
        }
    }

你可能感兴趣的:(GridView)