footer column re-ordering

I have footer in my grid defined as below. When I re-order columns in grid, footer columns/totals do not get re-ordered. What can I do so that footer gets re-ordered as well.

mygrid.attachFooter(

,”+
#cspan,#cspan,#cspan,#cspan,Total:,”+
0
,”+
0
,”+
0
,”);

Unfortunately column reordering is not compatible with merging cells in grid footer

Is there a different way I can write my footer (footer has count of rows and sum of few numerical columns) so that it can be compatible with column re-ordering?

You should not merge cells in footer

What do you mean by merge cells in footer?

Merging cells means using #cspan or #rspan