asp.netでGridViewのWidthを設定する方法
参考コード
/// <summary>
/// </summary>
/// <param name="srcView"></param>
/// <param name="width"></param>
public void SetGridViewColumnWidth(GridView srcView)
{
double cellWidth = srcView.Width.Value;
for (int i = 0; i < srcView.Rows.Count; i++)
{
for(int j = 0;j < srcView.Rows[i].Cells.Count;j++)
{
srcView.Rows[i].Cells[j].Width = Convert.ToInt16(cellWidth);
}
}
}