How can I open a form in datagrid cell click
In my project I have a report form to view all the details of one particular form. In this report form I can view all the data's of that particular form in datagridview. During this process I want to open that particular form in datagrid cell click . How can I do this process in c# windows application.Is there any possible to do this. Anybody can help this.

Pavithra LPosted Sep 3, 2015, 3:09 AM
Pavithra LPosted Sep 3, 2015, 2:50 AM
Blackbarbie BbPosted Sep 3, 2015, 2:47 AM
Pavithra LPosted Sep 3, 2015, 2:29 AM
Blackbarbie BbPosted Sep 3, 2015, 2:23 AM
'assume you have 3 column in the datagridview, the new form named form2. If the column is dinamic, you can use array.
Private Sub DataGridView1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.Click
Dim int As Integer = Me.DataGridView1.CurrentCell.RowIndex
Form2.Label1.Text = Me.DataGridView1.Item(0, int).Value
Form2.Label2.Text = Me.DataGridView1.Item(1, int).Value
Form2.Label3.Text = Me.DataGridView1.Item(2, int).Value
Form2.Show()
End Sub