开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜