Socarsky
Well-known member
I have 8 Buttons and related TextBoxes that when each of them runs then a DataGridView come up and retrieve records from DB but I have only one method to get value from DataGridview when any rows of it double clicks so far so good but the problem is how I can change Textbox's variables when it runs with their own variable with below method?
Private Sub dgvGroups_CellMouseDoubleClick(sender As Object, e As DataGridViewCellMouseEventArgs) Handles dgvGroups.CellMouseDoubleClick Dim strValue As String = String.Empty If dgvGroups.SelectedRows.Count > 0 Then strValue = dgvGroups.SelectedRows(0).Cells(0).Value.ToString End If Main.txtBtnGroup1.Text = Trim(strValue) ''''I need to change txtBtnGroup(NUMBERS 1 to 8) End Sub
Last edited: