我已经完成了这件事,它显示了一个错误,如Index was out of range. Must be negative and non zero value.
下面的代码,
Dim index_flag as Integer = 0
GridView1.Rows(index_flag).Cells(1).Text = ds.Tables(0).Rows(index_flag).Item("curr_datetime").ToString
GridView1.Rows(index_flag).Cells(2).Text = ds.Tables(0).Rows(index_flag).Item("site_id").ToString
GridView1.Rows(index_flag).Cells(2).Text = ds.Tables(0).Rows(index_flag).Item("site_name").ToString
GridView1.Rows(index_flag).Cells(3).Text = ds.Tables(0).Rows(index_flag).Item("dc_volt").ToString