Prashant20 0 Newbie Poster

i have developed a student form asking student details such as name, address, class,
standard etc...
The details are saved to STUDENT table (SQL Database). There is a another form with datagridview control showing data of STUDENT table. The form2 can be shown on student form
by VIEW button on this form.

Problem : I want to select the data from datagridview on form2 and on click of OK button (form2), the detail should be displayed on student form for UPDATE and DELETE data.

I am using the following on btnok_click event of Form2(the one having datagridview)

txtname.Text = dgvgrade.CurrentRow.Cells[1].Value.ToString();

Question : how can call txtname.Text of student table to btnok_click event of Form2


:-/ Please reply...!!