Iterating through DataGridViewRow columns
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 va开发者_JS百科lues.
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
精彩评论