c# datagridview 赋值
答案:1 悬赏:60 手机版
解决时间 2021-01-10 18:01
- 提问者网友:十年饮冰
- 2021-01-10 04:19
c# datagridview 赋值
最佳答案
- 五星知识达人网友:末日狂欢
- 2021-01-10 04:31
string[] a1 = new string[5] { "0", "1", "2", "3", "4" };
string[] a2 = new string[5] { "0", "1", "2", "3", "4" };
for (int i = 0; i < dataGridView1.ColumnCount; i++)
{
if (i > strs.Length) break;
dataGridView1.Rows[0].Cells[i].Value = a1[i];
dataGridView1.Rows[1].Cells[i].Value = a2[i];
}
string[] a2 = new string[5] { "0", "1", "2", "3", "4" };
for (int i = 0; i < dataGridView1.ColumnCount; i++)
{
if (i > strs.Length) break;
dataGridView1.Rows[0].Cells[i].Value = a1[i];
dataGridView1.Rows[1].Cells[i].Value = a2[i];
}
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯