Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi have codes for open a form with datagrdview values but
not working on showdialog
form opening but not any value in form

when i write
VB
form.Show()

noproblem

can you help me about this

thanks

What I have tried:

VB
Private Sub tablo_Click(ByVal sender As Object, ByVal e As EventArgs) Handles tablo.Click
        Dim form As New Form2

        form.firma.Text = tablo.CurrentRow.Cells(0).Value.ToString()
        form.gelenfirma.Text = tablo.CurrentRow.Cells(1).Value.ToString()
        form.satinalma.Text = tablo.CurrentRow.Cells(2).Value.ToString()
        form.aciklama.Text = tablo.CurrentRow.Cells(3).Value.ToString()

        form.ShowDialog()


    End Sub
Posted
Updated 26-Sep-19 16:24pm
v2
Comments
Ralf Meier 27-Sep-19 2:35am    
If you create a Form as a Dialog normally the data is transfered via Properties (from the form) to the Form - I would suggest that you also go better this way.
Now you access the Controls on the form directly. Perhaps you take a look on the Code-Scripts from your Form2 (especially those which are connected to the Form-Events) and see what happens there.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900