Hi all,
ANother newb question.
Is there a way to loop through the selected rows and store them in an array?
I've been working at it and have come up with this but it isnt working correctly.
2 Code:
int rCount = gridOffice.Rows.GetRowCount(DataGridViewElementStates.Selected); if (rCount> 0) { String[,]s = new String[rCount,cCount]; for (int i = 0; i < rCount; i++) { for (int j = 0; j < 2; j++) { s[i,j] = gridOffice.Rows[gridOffice.SelectedCells[i].RowIndex].Cells[j].FormattedValue.ToString(); } }
Thanks in advance


Reply With Quote
