开发者

How to sum the columns and add it to the last row of column in a datagridview?

I am new to winforms. I am just creating a score card application. There will be n number of columns and n of ro开发者_JAVA技巧ws. when the user changes the value of any cell, it should calculate the total of that column in the last cell/row of the column. I am using datagridview. which is that event that i need to fire on changing the value of cell.


You need to add your code to the CellEndEdit event


You will want to listen for the CellValueChanged event. The DataGridViewCellEventArgs will have the ColumnIndex that was updated so you know which column to re-add.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜