Categories | Question details Back To List | ||
dhtmlxGrid footer doesn't work Hello I try enable footer on the grid as explained on example in your site. unfortunately its doesn't work. here the code of page. its not show any data after loading. original page without footer is work. see http://72.29.94.150/~sensusco/tabs.php look on the second tab. <!-- Grid --> <style> div.gridbox div.ftr td{ text-align:right; background-color:#E5F2F8; border-right:0px solid gray; } div.gridbox_light table.hdr td { text-align:center; } </style> <div id="gridbox" style="width:100%;height:520px;overflow:hidden"></div> <script> function calculateFooterValues(stage) { if (stage && stage != 2); return true; var regQ = document.getElementById("reg"); regQ.innerHTML = sumColumn(9); var sepQ = document.getElementById("sep"); sepQ.innerHTML = sumColumn(10); var octQ = document.getElementById("oct"); octQ.innerHTML = sumColumn(11); var novQ = document.getElementById("nov"); novQ.innerHTML = sumColumn(12); var decQ = document.getElementById("dec"); decQ.innerHTML = sumColumn(13); var janQ = document.getElementById("jan"); janQ.innerHTML = sumColumn(14); var febQ = document.getElementById("feb"); febQ.innerHTML = sumColumn(15); var marQ = document.getElementById("mar"); marQ.innerHTML = sumColumn(16); var aprQ = document.getElementById("apr"); aprQ.innerHTML = sumColumn(17); var mayQ = document.getElementById("may"); mayQ.innerHTML = sumColumn(18); var junQ = document.getElementById("jun"); junQ.innerHTML = sumColumn(19); var julQ = document.getElementById("jul"); julQ.innerHTML = sumColumn(20); var augQ = document.getElementById("aug"); augQ.innerHTML = sumColumn(21); var allQ = document.getElementById("all"); allQ.innerHTML = sumColumn(22); return true; } function sumColumn(ind) { var out = 0; for (var i = 0; i < mygrid.getRowsNum(); i++) { out += parseFloat(mygrid.cells2(i, ind).getValue()); } return out; } mygrid = new dhtmlXGridObject('gridbox'); mygrid.setImagePath("libs/imgs/"); mygrid.enableRowsHover(true); mygrid.setHeader("קבוצה,שם פרטי,שם משפחה,ת.הצטרפות,img:[img/active.gif],img:[img/edit.gif],img:[img/sing.gif],img:[img/med.gif],img:[img/reg.gif],ספט,אוק,נוב,דצמ,ינו,פבר,מרץ,אפר,מאי,יונ,יול,אוג,הכנסה"); mygrid.attachHeader("#select_filter,#text_filter,#text_filter, , , , , , , , , , , , , , , , , , , "); mygrid.setInitWidths("155,105,105,75,*,*,*,*,30,30,30,30,30,30,30,30,30,30,30,30,30,45"); mygrid.enableSmartRendering(true); mygrid.enableColumnAutoSize(true); mygrid.setColAlign("right,right,right,right,center,center,center,center,"); mygrid.setColTypes("ed,ed,ed,co,ch,ch,ch,ch,price,price,price,price,price,price,price,price,price,price,price,price,price,price"); mygrid.attachFooter("Total quantity,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan,#cspan<div id='reg'>0</div>,<div id='sep'>0</div>,<div id='oct'>0</div>,<div id='nov'>0</div>,<div id='dec'>0</div>,<div id='jan'>0</div>,<div id='feb'>0</div>,<div id='mar'>0</div>,<div id='apr'>0</div>,<div id='may'>0</div>,<div id='jun'>0</div>,<div id='jul'>0</div>,<div id='aug'>0</div>,<div id='all'>0</div>", ["text-align:left;"]); mygrid.setSkin("dhx_skyblue"); mygrid.attachEvent("onEditCell", calculateFooterValues); mygrid.init(); mygrid.load("get.php", calculateFooterValues); </script> whats wrong? Answer posted by dhxSupport on Nov 30, 2009 01:50 Your sample returns error: dhxTabbar is not defined http://72.29.94.150/~sensusco/tabs.php Line 174 Also note, attachFooter() method is available in PRO version only. |