How to get current selected row in Datagridview and print using report viewer?

Viewed 38

I want to get the only current selected row in datagridview and print it using report viewer. I tried this code and they show the form2 and they print the whole database in my datagridview, I want only the selected row. Can anyone help me give me a codes or syntax and explain it to me. I badly need it. I really appreciated your help. Thank you very much.

 If e.RowIndex >= 0 Then selectedrow=DataGridView1.Rows(e.RowIndex)
 Form2.ShowDialog()
 End If
0 Answers
Related