changing header when rows are loaded

i am trying to change header when rows are loaded

grid.setHeader(",#cspan,Satellite 1, Satellite 2 “);

grid.attachEvent(“onXLS”, function() {
var title1 = grid.getUserData(grid.getRowId(1),“sat1”);
var title2 = granulesGrid.getUserData(granulesGrid.getRowId(1),“sat2”)
grid.setHeader(",#cspan," + title1 + ", " + title2 + “”);

However the header doesn’t change. Is there another way to do this. I don’t want whole header to come from xml



setHader() method was designed to configure the header before the init.
You may try to use setColLabel() method to change the header labels dynamically … olumnlabel