hi,
the first visible column of my datagridview is a checkbox . the gridview has 3 rows, and i want something to hapen when the user checks and unchecks the checkbox of the second row.
i found out the proper method to do that, but i get an error like "Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"
here is my code:
thanks a lot
the first visible column of my datagridview is a checkbox . the gridview has 3 rows, and i want something to hapen when the user checks and unchecks the checkbox of the second row.
i found out the proper method to do that, but i get an error like "Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index"
here is my code:
Private Sub ApMICDestinationTypesDataGridView_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles ApMICDestinationTypesDataGridView.CellValueChanged
Dim destination_abroad As Boolean = ApMICDestinationTypesDataGridView.Rows(1).Cells(2).Value
If destination_abroad = True Then
GroupTypeIDLabel.Visible = True
GroupTypeIDComboBox.Visible = True
else
GroupTypeIDLabel.Visible = False
GroupTypeIDComboBox.Visible = False
End If
End Sub
thanks a lot