Gridview columns and summation data alignment

We populate a gridview with numerical data derived from an SQL function. The data is US currency values, displayed to two decimal places, right-justified. This data looks good. A second SQL function calculates the sums of this gridview column data. We display the summation values just below the gridview. The issue is that we cannot position these summation values exactly below their respective columns. The vertical alignment may be close at one screen resolution but it will be out of place at another resolution.
There must be some built-in gridview feature that will sum the column values and display the value in the correct position below the gridview? If so, can you point me towards the Yii documentation for that feature? Or if that feature does not exist, how would I go about placing data exactly below a gridview column. We would also like to place numeric values directly above the gridview columns, on top of the gridview frame, that also perfectly align with the column data.

Perhaps this?

https://www.yiiframework.com/doc/api/1.1/CGridView#hasFooter-detail

https://www.yiiframework.com/doc/api/1.1/CGridColumn#footerCellContent-detail

Thank you for the suggestions. I googled for some of the info you provided. I found this:

As I am not our developer, I will pass all of these links to our guy and see if they can utilize any of it.