Hi,
I want to sum the values in the columns of the datagridview when I click the button......in WIN FORMS...........HELP!!!
HOW TO SUM THE VALUES IN THE DATAGRIDVIEW....
Page 1 of 13 Replies - 2043 Views - Last Post: 11 June 2012 - 08:55 PM
Replies To: HOW TO SUM THE VALUES IN THE DATAGRIDVIEW....
#2
Re: HOW TO SUM THE VALUES IN THE DATAGRIDVIEW....
Posted 11 June 2012 - 04:16 AM
01088, on 11 June 2012 - 03:03 AM, said:
Hi,
I want to sum the values in the columns of the datagridview when I click the button......in WIN FORMS...........HELP!!!
I want to sum the values in the columns of the datagridview when I click the button......in WIN FORMS...........HELP!!!
How are you wanting the results be shown, are you wanting a message box to appear with the result or a label to be shown on the Form to show the result?
John
#3
Re: HOW TO SUM THE VALUES IN THE DATAGRIDVIEW....
Posted 11 June 2012 - 07:33 AM
use FOR/EACH loop:
pseudocode:
pseudocode:
Dim ColSum As Integer For Each R As DatagridViewRow In DataGridView1.Rows ColSum+=R.Cells(X).Value Next
#4
Re: HOW TO SUM THE VALUES IN THE DATAGRIDVIEW....
Posted 11 June 2012 - 08:55 PM
Hi,
When I click the button I want the result of the column added values to be displayed in the text box...
When I click the button I want the result of the column added values to be displayed in the text box...
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|