日期:2014-05-17 浏览次数:20818 次
for (int i = 1; i < DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month); i++) { DataGridViewColumn col = new DataGridViewColumn(); col.HeaderText = i.ToString(); dataGridView1.Columns.Add(col) }