Copying datagridview column data to an event button

:cool: hey thats what I wanna achieve, if only I could. I was thinking of ways for copying data from a column (Cinema) in a datagridview called Session and copying it's data to a Sales button and a Returns button. When the user clicked either button, depending on what Cinema was selected from the Session datagridview the corresponding Cinema form would open.

An example could be if a user choose the number "1" from the Cinema column and clicked either the returns or sales button the form called "frmCinema1" would open.

:thumb: The only solution for the sales button or the returns button, I could come up with would look something like this:

Dim SelRow As String = SessionView.SelectedRows(0).Cells("Cinema").Value

If SelRow = 1 Then
End If

If SelRow = 2 Then
End If

.......................... (means that the "if statements are carried on depending on how many statement there are).

There must be another way of achieving the same result but not using "if statements". If someone would be up for the challenge I would really like to know how you would do it :D

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!