初学NET出错
程序代码:
conn.Open() sql = "select * from WIPManagementInOut where OutTime is null" Dim da As OleDbDataAdapter = New OleDbDataAdapter(sql, conn) da.Fill(ds, "WIPManagementInOut") DataGridView1.DataSource = ds.Tables(0) DataGridView1.Refresh() For i As Integer = 0 To Me.DataGridView1.RowCount - 1 If DateDiff(DateInterval.Minute, Me.DataGridView1.Item(6, i).Value, Now()) > 3 Then ‘为什么在这里出错?求指点 Me.DataGridView1.Rows(i).DefaultCellStyle.BackColor = Color.YellowGreen End If Next ’主要是Me.DataGridView1.Item(6, i).Value 这里出错,不知道为什么
[此贴子已经被作者于2016-6-20 17:14编辑过]