次のコードがあります。
protected void exampleGridView_RowDataBound(object o, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Width = new Unit("150px");
e.Row.Cells[1].Width = new Unit("5px");
e.Row.Cells[2].Width = new Unit("150px");
e.Row.Cells[3].Width = new Unit("150px");
e.Row.Cells[4].Width = new Unit("150px");
e.Row.Cells[5].Width = new Unit("150px");
e.Row.Cells[6].Width = new Unit("150px");
// and so on
}
}
セルの高さも設定できますか? ありがとう!