
Duda rápida
Publicado por Carlos (11 intervenciones) el 04/07/2014 10:41:59
hola, tengo un datagrid y haciendo doble click sobre una fila se me abre un cierto formulario con los textbox rellenos, lo que pasa que tengo varios formularios, y se abren dependiendo del valor de una columna tal que así
Lo que me gustaria es que en vez de meter ,O1,O2;O3, y O4, se pudiese poner los valores que empiezan por O.
Alguien sabe como hacerlo?que tengo que cambiar?
Un saludo y gracias.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim row As DataGridViewRow = DataGridView1.CurrentRow
If DataGridView1.SelectedRows(0).Cells("categoria_del_vehiculo").Value = "M1" Then
Dim frm As New ficha(row)
frm.Show()
Me.Finalize()
Else : If DataGridView1.SelectedRows(0).Cells("categoria_del_vehiculo").Value = "N1" Then
Dim form As New fichaN(row)
form.Show()
Me.Finalize()
Else : If DataGridView1.SelectedRows(0).Cells("categoria_del_vehiculo").Value = "O1" Then
Dim formu As New fichaO(row)
formu.Show()
Me.Finalize()
Else : If DataGridView1.SelectedRows(0).Cells("categoria_del_vehiculo").Value = "O2" Then
Dim formu As New fichaO(row)
formu.Show()
Me.Finalize()
Else : If DataGridView1.SelectedRows(0).Cells("categoria_del_vehiculo").Value = "O3" Then
Dim formu As New fichaO(row)
formu.Show()
Me.Finalize()
Else : If DataGridView1.SelectedRows(0).Cells("categoria_del_vehiculo").Value = "O4" Then
Dim formu As New fichaO(row)
formu.Show()
Me.Finalize()
Else : Dim formul As New fichasl(row)
formul.Show()
Me.Finalize()
End If
End If
End If
End If
End If
End If
Me.Finalize()
End Sub
Alguien sabe como hacerlo?que tengo que cambiar?
Un saludo y gracias.
Valora esta pregunta


0