Hello,
I have a unbound datagridview which depend on Query from Access database like following -
Column1 Column2 Column3 Column4 Column5
Date InvoiceID CustomerName Cash / Credit Amount
03/05/2020 19 ABC Cash 60.00
14/05/2020 28 ABC Credit 30.00
16/05/2020 29 ABC Credit 100.01
18/05/2020 34 ABC Cash 1250.00
20/05/2020 41 ABC Cash 30.00
I have made 3 Textboxes as 1. Cash (TxtCash.Text) 2. Credit (TxtCredit.Text) 3. Total (TxtTotal.Text)
Now I want to show total Cash amount in Cash text box, total Credit amount in Credit text box and Total of both in Total text box.
In this case - Cash Total - 1340.00, Credit Total - 130.01 and Total amount - 1470.01.
I am attaching image of form for reference.
How could I do this automatically when datagridview is load or if not possible by a Show Total button ?
Any code for this ?
Thanks in advance.
I have a unbound datagridview which depend on Query from Access database like following -
Column1 Column2 Column3 Column4 Column5
Date InvoiceID CustomerName Cash / Credit Amount
03/05/2020 19 ABC Cash 60.00
14/05/2020 28 ABC Credit 30.00
16/05/2020 29 ABC Credit 100.01
18/05/2020 34 ABC Cash 1250.00
20/05/2020 41 ABC Cash 30.00
I have made 3 Textboxes as 1. Cash (TxtCash.Text) 2. Credit (TxtCredit.Text) 3. Total (TxtTotal.Text)
Now I want to show total Cash amount in Cash text box, total Credit amount in Credit text box and Total of both in Total text box.
In this case - Cash Total - 1340.00, Credit Total - 130.01 and Total amount - 1470.01.
I am attaching image of form for reference.
How could I do this automatically when datagridview is load or if not possible by a Show Total button ?
Any code for this ?
Thanks in advance.
Last edited: