datagridview dynamic with image

前端 未结 2 1383
北荒
北荒 2021-01-26 14:33

I need a little help to create a datagridview dynamically.

The objective is to ping a list of IP or HostName\'s success and inserted in the grid (host, date, and Image

2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-26 15:13

    Did you uncomment all the GridView1.Rows.Add lines for testing purposes?

    I noticed that in all three blocks where you add rows to your DataGridView, you're always sending GridView1.Rows.Add(pictureRed, TextboxHost.Text, TextboxWhen.Text);

    Did you mean to have something like GridView1.Rows.Add(pictureGreen, TextboxHost.Text, TextboxWhen.Text); under your if (Reply.Status == IPStatus.Success) block?

提交回复
热议问题