I have this problem with dhtmlxgrid version 2.5: the second line of the header, obtained using attachHeader, is partially hidden by the first line of the grid. Only if i try to resize the grid or make a selction in the combo box, the header is full displayed.
Can i force the header hight?
Thank
Paolo
The code are:
var mygrid;
function doInitGrid(){
mygrid = new dhtmlXGridObject(“prenotazioni”);
mygrid.setImagePath("/microasp/js/dhtmlx/imgs/");
mygrid.setSkin(“light”);
mygrid.enableAutoHeight(true);
mygrid.setHeader(“ID,Utente,Appartamento,Data Iniz,Data Fine,Pagato fino a,Stato,Data Prenotazione,Importo,Info”);
mygrid.setColAlign("right,left,left,left,left,left,left,left,right,left,left");
mygrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro");
mygrid.setColSorting("int,str,na,date,na,na,str,date,na,na,na");
mygrid.loadXML("booking.phtml?azione=xml_booking",
function() {
mygrid.attachHeader("#rspan,#rspan,#rspan,#rspan,#rspan,#rspan,<div id=\'status_flt\' style=\'padding-right:3px;\'></div>,#rspan,Anticipo,#rspan");
var statusFlt = document.getElementById("status_flt").appendChild(document.getElementById("status_flt_box").childNodes[0]);
statusFlt.options.add(new Option("Tutte le prenotazioni", ""));
statusFlt.options.add(new Option("Aperte", "Aperta"));
statusFlt.options.add(new Option("Scadute", "Scaduta"));
statusFlt.options.add(new Option("Non Confermate", "Non Confermata"));
statusFlt.options.add(new Option("Chiuse", "Chiusa"));
statusFlt.options.add(new Option("Cancellate", "Cancellata"));
}
);
mygrid.init();
}
function filterBy() {
var sVal = document.getElementById("status_flt").childNodes[0].value.toLowerCase();
for (var i = 0; i < mygrid.getRowsNum(); i++) {
var sStr = mygrid.cells2(i, 6).getValue().toString().toLowerCase();
if ((sVal == "" || sStr.indexOf(sVal) == 0))
mygrid.setRowHidden(mygrid.getRowId(i), false);
else
mygrid.setRowHidden(mygrid.getRowId(i), true);
}
}
doInitGrid();
</script>