Hi every one. I am having some problem with calculation in datagridview. i have 3 columns in datagridview which are Date,location,Payment. What i want to do now is i want to calculate the total of the payment and my total is a textfield out side the data gridview under the payment field with the label total. This payment is for a specific person who books a photo shoot.suppose when customer 1st comes in the store he pays 30 pounds and second time he pays 20 pounds so total should come up as 50.every time customer comes total for that particular customer should change.please help.Or if possible can some one provide the code
dilse4sk
0
Junior Poster in Training
Recommended Answers
Jump to PostYou will need a seperate table for the customer.
Something Like
::Table Name: Cust_info::
::Column 1:cust_id::
::Column 2:cust_name::
::Column 3:cust_charges::
::Column 4:cust_payed::
Jump to PostYou could:
'Fist grab the total try Dim s As String = "SELECT payment FROM customer WHERE cust_id=" & cusID '< A variable that you asign the value to. Dim cmd As new OLEDBCommand(sqls,con)'Where con is OLEDBConnection(See URL Below) 'Be sure to open the connection con.Open() Dim …
Jump to PostFire the code off from the payment textbox's Leave event.
That way after you leave the payment text box, the total is calculated.
Jump to PostHi every one. I am having some problem with calculation in datagridview. i have 3 columns in datagridview which are Date,location,Payment. What i want to do now is i want to calculate the total of the payment and my total is a textfield out side the data gridview under the …
All 16 Replies
Begginnerdev
256
Junior Poster
dilse4sk
0
Junior Poster in Training
Begginnerdev
256
Junior Poster
dilse4sk
0
Junior Poster in Training
Begginnerdev
256
Junior Poster
dilse4sk
0
Junior Poster in Training
Jx_Man
987
Nearly a Senior Poster
Featured Poster
M.Waqas Aslam
67
Posting Pro in Training
Featured Poster
dilse4sk
0
Junior Poster in Training
Begginnerdev
256
Junior Poster
M.Waqas Aslam
67
Posting Pro in Training
Featured Poster
dilse4sk
0
Junior Poster in Training
M.Waqas Aslam
67
Posting Pro in Training
Featured Poster
Rem_1
0
Newbie Poster
Rem_1
0
Newbie Poster
geetha_3
0
Newbie Poster
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.