0

How CAn I get the "sum" of a "Column" in a Data Grid?
I dont't use /connect database with my Data Grid!
How can I make this happen?
Thank you for any responses!

Edited by pritaeas: Moved to software.

Attachments waw.jpg 68.72 KB
2
Contributors
1
Reply
7
Views
4 Years
Discussion Span
Last Post by oussama_1
0
        Dim sum As Integer = 0
        For i = 0 To DataGrid.Rows.Count - 1
            sum = sum + DataGridView1.Rows(i).Cells(4).Value
        Next

as for the second question i didnt understand it, can you explain more?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.