1
我的數據網格視圖包含一列。 DataGridView
許多行是空的我正在使用循環刪除這些行。使用LOOP刪除Datagridview行
For j = 0 To DataGridView1.RowCount - 1
If DataGridView1.Rows(j).Cells(0).Value.ToString.Length = 0 Then
DataGridView1.Rows.RemoveAt(j)
End If
Next
錯誤:索引超出範圍。必須是非負數,並且小於集合的大小 。
在此先感謝!