2-dimensional Integer array to DataGridView

后端 未结 2 1644
温柔的废话
温柔的废话 2020-12-10 05:32

How would I go about displaying a 2-dimensional integer array into a DataGridView Control in C# .Net 4.0?

2条回答
  •  隐瞒了意图╮
    2020-12-10 06:00

    to get Merlyn's solution to work you'll need to set the column count before you add rows to the datagridview:

    dataGridView1.ColumnCount = 3;
    

提交回复
热议问题