i have a form from all costumers and i also have all payments now i need a sum field for all payments from a DataGridView
gefen2215
Recommended Answers
Jump to PostAssuming that the datagridview is bound to a datatable, then you can use the DataTable.Compute method.
Dim total As Decimal = CDec(dt.Compute("Sum([Payments])", "True"))
Where "dt" is the name of the datatable. I assumed that the column name in the datatable for "paymenents" is "Paymenents".
All 2 Replies
M.Waqas Aslam
67
Posting Pro in Training
Featured Poster
TnTinMN
418
Practically a Master Poster
M.Waqas Aslam
commented:
very nice one , i dont know about it before .
+0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.