是的,可以使用以下方法清除DataGridView的所有列:
dataGridView1.Columns.Clear();
while (dataGridView1.Columns.Count > 0) { dataGridView1.Columns.RemoveAt(0); }
这些方法可以清除DataGridView的所有列,使其变为空白表格。
云+社区技术沙龙[第14期]
T-Day
云+社区技术沙龙[第21期]
云+社区技术沙龙[第12期]
Elastic 中国开发者大会
领取专属 10元无门槛券
手把手带您无忧上云