如何计算列并将其添加到datagridview中最后一列的列? [英] How to sum the columns and add it to the last row of column in a datagridview?

查看:177
本文介绍了如何计算列并将其添加到datagridview中最后一列的列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很喜欢winforms。我只是创建一张记分卡应用程序。
将有n个列和n行。当用户更改任何单元格的值时,它应该计算该列的最后一个单元格/行中该列的总和。我正在使用datagridview。这是那个我需要改变单元格值的事件。

解决方案

你需要将代码添加到< a href =http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellendedit.aspx =nofollow> CellEndEdit事件


I am new to winforms. I am just creating a score card application. There will be n number of columns and n of rows. 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

这篇关于如何计算列并将其添加到datagridview中最后一列的列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆