setColumnHidden not working

Hi,
I want use setColumnHidden,but its not working. Could you help me please. this my code

function doOnLoad(){

	myLayout = new dhtmlXLayoutObject("browseContainer", "2E");
   	myLayout.cells("a").hideHeader();
    myLayout.cells("a").setHeight(250);
    myLayout.cells("b").hideHeader();
    myLayout.cells("b").attachObject("editor");
    
    
	myGrid = myLayout.cells("a").attachGrid();
    myGrid.setHeader(" ,No,Kode Pasien, Nama Pasien, Alamat, Jenis Kelamin, Kontak, Penyakit"); 
    myGrid.setColTypes("img,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro"); 
    myGrid.setInitWidths("30,30,100,200,*,100,100,100,50");
    myGrid.setColAlign("center,center,left,left,center,center,center,center");
    myGrid.setColSorting('str,str,str,str,str,str,str,str,str');
  	
    myGrid.setIconsPath('dhtmlx/codebase2/imgs/');
    myGrid.setColumnHidden(7,true);
  
  	myGrid.attachEvent("onRowSelect", doOnRowSelected );
  	
	rowId = "0";
	
	myGrid.init();
	myGrid.load("${ctx}/pasien/getPasiens");
	
	
    
}

To start, the following lines do not reference the same number of columns:

myGrid.setHeader(" ,No,Kode Pasien, Nama Pasien, Alamat, Jenis Kelamin, Kontak, Penyakit");
myGrid.setColTypes(“img,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro”);
myGrid.setInitWidths(“30,30,100,200,*,100,100,100,50”);
myGrid.setColAlign(“center,center,left,left,center,center,center,center”);
myGrid.setColSorting(‘str,str,str,str,str,str,str,str,str’);

How many columns do you have in the grid? 11? Occasionally, I have had difficulties that were fixed by just making sure every column is addressed in each of the above lines, no more, no less.

This may not solve your problem of hiding a column, but it will at least serve to make things more clear.

Unfortunately your issue cannot be reproduced locally.
the column sets hidden well for us.
If issue still occurs - please, provide with a demo link or a complete demo where the issue can be reproduced.