开发者

Iterating through DataGridViewRow columns

开发者 https://www.devze.com 2023-03-06 00:12 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消