I was doing something like this - trying to have a button, in the footer span multiple cols.
I ran into a problem when I set columnspan via code, because a) I'm a noob, and b) it was not doing what I expected. I don't remember all the details, but there was some kind of gotcha in there - like it was adding extra columns or something.
Here was my solution. Maybe some of it will be useful. I did in the prerender for the gridview (gvDocs).
And what got it working correctly for me, was programatically removing cells of the footer as well as setting the columnspan.
Even if the code doesn't help, maybe people will get a laugh at the encroaching forgetfulness afflicting me. It makes me laugh sometimes.
Protected Sub gvDocs_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles gvDocs.PreRender
If gvDocs.Rows.Count > 0 Then
Dim m As Integer = gvDocs.FooterRow.Cells.Count
For i As Integer = m - 1 To 1 Step -1
If i <> 8 Then '7 is the number of the column with the applychanges button in it.
gvDocs.FooterRow.Cells.RemoveAt(i)
End If
Next i
gvDocs.FooterRow.Cells(1).ColumnSpan = 6 '6 is the number of visible columns to span.
End If
End Sub