Hi I am new to C#, I have a datagridview that populates student data. I also have a button beside each student row. This button would go to a new form with the student details of that selected student in the first form.
Here is an example of what that would look like. How do I code the button to go to a student details form for that selected student that the button was pressed for?


Muhammad Imran AnsariRank #326 · 7.6K reputationPosted May 4, 2022, 2:02 PM EDT
Uttam KumarRank #1,076 · 1.8K reputationPosted May 4, 2022, 12:54 PM EDT
Sam HobbsRank #107 · 20.5K reputationPosted May 6, 2022, 5:33 AM EDT
You say datagridview so you mean Windows Forms application, correct? Not WPF and not DataGrid, correct? If so then the answer from Muhammad Imran Ansari is for you.