Reputation: 21260
How can I iterate through DataGridViewRow
columns? I just want to get the number of columns that I have and go through them and get the values.
Upvotes: 0
Views: 1569
Reputation: 30097
You can use Cells
property to get all values row have
foreach(DataGridViewCell cell in row.Cells)
{
get value by cell.Value
}
and number of columns is equal to number of cells
Upvotes: 4