According to your description, i made demo for you. I compare the 2 adjacent values by traversing the GridView, and if they are not the same, let them add.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Member
293 Points
676 Posts
Grand Total For Each Column Based On RefNo
Dec 05, 2019 10:39 AM|Gopi.MCA|LINK
Hello
This is my Gridview Data
Column total should come based on Refno
That is 150 + 200 +50 =400
coz 50 three times but see only one Refno
how to get column total
Thanking You
Contributor
3370 Points
1409 Posts
Re: Grand Total For Each Column Based On RefNo
Dec 06, 2019 03:27 AM|samwu|LINK
Hi Gopi.MCA,
According to your description, i made demo for you. I compare the 2 adjacent values by traversing the GridView, and if they are not the same, let them add.
The code:
The result:
Best regards,
Sam