Grid with Group and frozen Column issues

I have a grid that is grouping by a hidden column. Since it is rather wide I want to freeze the first column. However when I do that the group header disappears, and the column that is split no longer aligns correctly with the rest of the row. See attached image.

Any suggestions will be greatly appreciated!

Snippet of my code:

mygrid.setColumnHidden(2,true);
   mygrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ron,ron,ron,ron,ron,ron,ron,ron");
   mygrid.setSkin("dhx_skyblue");
   mygrid.init();
   mygrid.groupBy(2);
   mygrid.splitAt(1);
   mygrid.loadXML("Data_Project_List.php");


Please, try to call the groupBy() method aftyer the splitAt().
It is recommended to call it when the data is loaded to the grid.
Also, please, try to add the style string to your groupBy method.

Here is the example:

mygrid.setColumnHidden(2,true) mygrid.setColSorting("na,str,str,int,int,int,na,na") mygrid.init(); mygrid.setSkin("dhx_skyblue") mygrid.splitAt(1); mygrid.loadXML("grid.xml",function(){ mygrid.groupBy(2,["#title","","","","","","",""]); });

I gave that a shot and things are even worse. See attached.

Please, provide a sample of init of your code to reconstruct the issue.

I made one mistake in the callback function and it appears to be working more like the way I think it should. However, the title is in column 1, and doesn’t span across columns. I .

[code]mygrid.setColumnHidden(2,true);
mygrid.setColTypes(“ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ron,ron,ron,ron,ron,ron,ron,ron”);
mygrid.setSkin(“dhx_skyblue”);
mygrid.enableColSpan(true);
mygrid.init();
mygrid.splitAt(1);
mygrid.loadXML(“Data_Project_List.php”,function(){
mygrid.groupBy(2,[“#title”,“#cspan”,“#cspan”,“#cspan”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”,“”]);
for (var a in mygrid._groups){ // for each group
var id=mygrid.getUID();
mygrid.addRow(id,[“”,“”,a]) // add total row
mygrid.setRowColor(id,“#FFFFCC”)
mygrid.setRowExcellType(id,“ro”)
mygrid.setColspan(id,0,18); //count of columns in grid
var bdgtTotal=0;
mygrid.forEachRow(function(id){ //calculate grid total
if (mygrid.cells(id,this._gIndex).getValue()==a)
bdgtTotal+=parseFloat(mygrid.cells(id,20).getValue()); // 3 - index of column for calculations
})
var cmmtTotal=0;

     mygrid.forEachRow(function(id){   
        if (mygrid.cells(id,this._gIndex).getValue()==a)
			cmmtTotal+=parseFloat(mygrid.cells(id,21).getValue());  
     })
     var invTotal=0;         
     mygrid.forEachRow(function(id){   
        if (mygrid.cells(id,this._gIndex).getValue()==a)
			invTotal+=parseFloat(mygrid.cells(id,22).getValue());
     })        
	 var expTotal=0;
     mygrid.forEachRow(function(id){   
        if (mygrid.cells(id,this._gIndex).getValue()==a)
			expTotal+=parseFloat(mygrid.cells(id,23).getValue());
     })     
     var hcTotal=0;
     mygrid.forEachRow(function(id){   
        if (mygrid.cells(id,this._gIndex).getValue()==a)
			hcTotal+=parseFloat(mygrid.cells(id,24).getValue());
     })     
     var scTotal=0;
     mygrid.forEachRow(function(id){   
        if (mygrid.cells(id,this._gIndex).getValue()==a)
			scTotal+=parseFloat(mygrid.cells(id,25).getValue());
     })     

     mygrid.cells(id,19).setValue("Total:");   // set total value
     mygrid.cells(id,20).setValue(bdgtTotal);   // set total value
     mygrid.cells(id,21).setValue(cmmtTotal);   // set total value
     mygrid.cells(id,22).setValue(invTotal);   // set total value
     mygrid.cells(id,23).setValue(expTotal);   // set total value
     mygrid.cells(id,24).setValue(hcTotal);   // set total value
     mygrid.cells(id,25).setValue(scTotal);   // set total value
     
  }

});
[/code]

If I move “#title” to the first position in the array it appears in column 1, but it does not span across columns like I want it to.

Also I have some group totals that are calculated in the call back function that no longer display in the correct columns. They did before I moved the group by in to the callback. I’m sure I have the syntax wrong. Thanks for your help.


You should place the title of the group in the un-frozen part of the grid.
It is not available to place span between frozen and un-frozen parts of the grid.

I have tried every position in the array and the only spot the title will appear is in the frozen part

I got the same problem. No matter where i put “#title” in the array (either frozen or non-frozen part), the group header is disappeared. Do you find solution for this yet?

i figure it out, if i set my hidden column to visible, it works fine.