我希望在设置DataSource之后以及在向用户显示之前获取codeBehind中每列DataGridView的宽度:
DataGridView dgv = new DataGridView();
dgv.AutoGenerateColumns = true;
dgv.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
dgv.AutoSize = true;
dgv.DataSource = dc.Branches.ToList();
this.Controls.Add(dgv);
//How to get Width of each Column Here??
var ColCount = dgv.Columns.Count; //return 0 ??