Public Sub AddRowSel() '选中新增行 For i As Integer = 0 To dgvfx_flow.Rows.Count - 1 If dgvfx_flow.Rows(i).Cells(0).Value = "0000" Then dgvfx_flow.Rows(i).Selected = True End If Next