为什么只能删除一行?
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
For RowListIndex As Integer = 0 To 10
Row = Table.NewRow
Row(0) = RowListIndex + 1
Row(1) = RowListIndex + 2
Row(2) = RowListIndex + 3
Table.Rows.Add(Row)
Next RowListIndex
dgList.DataSource = Table
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim i As Integer
i = MsgBox("请确认操作!", MsgBoxStyle.Information + MsgBoxStyle.YesNo + MsgBoxStyle.DefaultButton1, "删除提示信息!")
If i = 6 Then 'clear
Row.Delete()
dgList.DataSource = Table
'Row.AcceptChanges()
End If
End Sub
不管按button4多少次都只能删除一行