It may be because you are using the
SelectedRows
collection; is there any chance that clicking on a cell does not automatically select the corresponding row?
Why not using the event arguments for that?
AssgnCusNo = CInt(DataGridView2.Rows(e.RowIndex).Cells(1).Value.ToString())