Dear Friend,
I take that you are selecting the row with the help of checkbox then write the code on the checkbox changed event of the grid :-
private void chkSelect_CheckedChanged(object sender, EventArgs e)
{
try
{
CheckBox chk = new CheckBox();
chk = sender as CheckBox;
if(chk.Checked == true)
{
foreach(DataGridViewRow row in dgvDetails.Rows)
{
[here you can find all the controls and there value and then you can put them into appropriate variables and use them accordingly].
}
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message())
}
}
Please don't forget to mark this as your answer if it helps you out.
Thanks
Varun Sareen