Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by J. Künzel on Dec 08, 2008 10:10
open dhtmlx forum
setColumnHidden and printView involve 2 header

Hi,

I use printView and setColumnHidden to hide the first Column. In printView window the table header appears twice followed by the filterrow. I use IE.

best regards
Answer posted by Support on Dec 08, 2008 10:22
Unfortunately the issue can't be reconstructed locally.
Please provide exact code used for grid's header initialization
Answer posted by J. Künzel on Dec 08, 2008 11:09

The code:

function doInitGrid(){
mygrid = new dhtmlXGridObject('mygrid_container'); 
               
mygrid.setImagePath("codebase/imgs/"); 
                       
mygrid.setInitWidths("50,50,50,100,240,100,60,35,45,45,50,*");

mygrid.setHeader(" ,F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11"); 
       
mygrid.setColAlign("left,left,left,left,left,left,center,left,center,center,left,left");

mygrid.attachHeader(" ,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter, , ");
               
mygrid.enableLightMouseNavigation(true);

mygrid.setColTypes("link,ro,ro,ro,ro,ro,link,ro,ro,ro,link,link");
mygrid.setColSorting("str,str,str,str,str,str,int,str,int,int,str,str"); 
 
mygrid.init();
mygrid.setSkin("light");
                                                                             
mygrid.parse(ar,"jsarray");

}

function printTab(){
var before = "<h1>PrintView</h1>";
var after = "2008";
for (var i=0; i<mygrid.getRowsNum(); i++)
    mygrid.render_row(i);

mygrid.setColumnHidden(0,true);                
mygrid.printView(before,after);
mygrid.setColumnHidden(0,false);  
                    
}

<body onload="doInitGrid()">

printTab() starts with onclick event.