Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more: , +
I have two forms. When i click the selected record in the datagridview of form 1, i want to see the student history in form 2 by its datagridview.

Expected Result

Expected Result Image

Database Relationship

Database Relationship Image

I only have this code in passing the values from datagridview to textbox.

VB
form2.txtStudLN.Text = dgv1.CurrentRow.Cells(1).Value
form2.txtStudFN.Text = dgv1.CurrentRow.Cells(2).Value.ToString()
form2.txtStudMN.Text = dgv1.CurrentRow.Cells(3).Value.ToString()


Can someone help me to solve this.. Thanks in advance
Posted
Updated 30-Dec-15 7:12am
v4
Comments
Sergey Alexandrovich Kryukov 30-Dec-15 16:13pm    
And what's the problem? You can assign Value to any cell with matching ValueType.
—SA
VishwaKL 5-Jan-16 0:14am    
capture the related data on cell click, on click of the cell get all the data which you want to display to another data grid. once you capture all the details load new datagrid and display.

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