foreach (DataGridViewRow row in datagridviews.Rows)
{
currQty += row.Cells["qty"].Value;
//More code here
}
foreach(DataGridViewRow row in yourDataGridView.Rows)
{
foreach(DataGridViewCell cell in row.Cells)
{
//do operations with cell
}
}