foreach(DataGridViewRow row in yourDataGridView.Rows) { foreach(DataGridViewCell cell in row.Cells) { //do operations with cell } }