Hi guys
I would like to know how I can make a single click and if i select more than one row, label should be counting the value how many rows i have selected.
Here it the code:
Code:Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick If Me.DataGridView1.SelectedCells.Count >= 1 Then Label19.Text = DataGridView1.SelectedRows.Count End If End Sub Private Sub DataGridView1_CellDoubleClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellDoubleClick DataGridView1.ClearSelection() If DataGridView1.SelectedCells.Count <= 0 Then Label19.Text = "0" End If End Sub
When I select the row and when I select more than one row, label didn't counting the rows i have selected. Please let me know how i can resolve it??
Thanks,
Mark




Reply With Quote