samedi 6 août 2016

Selecting 2 data in datagridview randomly

I can only select 1 data.. i would like to select 2 data in the datagridview randomly. Thank you..

  Private Sub Butt_Click(ByVal sender As Object, ByVal e As System.EventArgs)

  FindRandRow().Selected = True
       End Sub
Private Function FindRandRow() As DataGridViewRow
    ' this finds a random row in the datagridview
    Return dgv.Rows(rand.Next(0, dgv.RowCount))

End Function




Aucun commentaire:

Enregistrer un commentaire