I have a basic site that pulls number from a table and calculates the totals at the foot of the table. This works well until the links to the columns are clicked to sort the table. When this is done the totals are multiplied by 2. I tried to pull the view state of the totals and push it back so it doesn't double but I'm struggling with the logic on this one. Maybe there's a better way to do it?
Code is attached. Thanks.