Categories | Question details Back To List | ||
Refresh Footer in firefox I see in knowedge this topic : Question posted by Klaus Kohlschuetter on Feb 12, 2009 23:26 open in interactive version Refresh Footer Answer posted by dhxtSupport on Feb 13, 2009 05:39 You can force grid stat recalculation by next command grid.callEvent("onGridReconstructed",[]) after it , all footer values will be recalculated, and if grid has not data, #stat_total will be replaced with 0 This is Ok with IE not with FireFox ? how refresh Footer after cell calculate in FireFox ? best regards Answer posted by Support on Oct 29, 2009 04:38 grid.callEvent("onGridReconstructed",[]) method works both for IE and FireFox. Can you provide sample of code where this method doesn't work? (You can send such example directly to the support@dhtmlx.com). Answer posted on Oct 29, 2009 08:43 When i open file htlm the footer no refresh with fireFox, chrome and opera. Only IE, the footer refresh. file htlm <htlm> <body> <div id="t1" width="100%" height="10px" style="background-color: white; overflow: false;"></div> <body> <script> var count,limit,autreFGHS,autreIACQ; function afficheMontantT1(){ t1 = new dhtmlXGridObject('t1'); t1.setNumberFormat("0,000.00",13,",","."); t1.setImagePath("css/imgs/"); t1.setSkin("light"); var flds1 = "08/,Accorde,Engage,Commande,FAO,Comptabilise,IACQ,FGHS,En cours,Accompte,A engager, A commander, A comptabiliser,% FGHS"+ ",%FGHS-12,%FGHS-18"; t1.setHeader(flds1); t1.setInitWidthsP("5,5,5,8,5,8,5,5,5,6,7,8,9,5,7,7"); t1.setColAlign("center,center,center,center,center,center,center,center,center,center,center,center,center,center,right,center,center"); t1.setColSorting("str,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int"); t1.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ron,ron,ron"); t1.enableAutoHeigth(true); t1.init(); } function t1LoadXml(metier){ if(metier == "autres"){ t1.attachFooter("Total,{#stat_total},{#stat_total},{#stat_total},{#stat_total},{#stat_total},{#stat_total},{#stat_total},{#stat_total},{#stat_total},{#stat_total},"+ "{#stat_total},{#stat_total},{#stat_total},{#stat_total},{#stat_total}",["text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;","text-align:center;color:red;font-weight:bold;"]); } t1.loadXML("FichiersXML/"+metier+"AffichageMontantT1.xml",function(){ // calcule count = t1.getRowsNum(); for (limit = 0; limit < count;limit++){ fctCal(t1.cellByIndex(limit,1),t1.cellByIndex(limit,2),'-',t1.cellByIndex(limit,10));// T1 autre engagé fctCal(t1.cellByIndex(limit,2),t1.cellByIndex(limit,3),'-',t1.cellByIndex(limit,11));// T1 autre a commander fctCal(t1.cellByIndex(limit,3),t1.cellByIndex(limit,5),'-',t1.cellByIndex(limit,12));// T1 autre A comptabiliser autreFGHS = t1.cellByIndex(limit,7).getValue(); autreIACQ = t1.cellByIndex(limit,6).getValue(); t1.cellByIndex(limit,13).setValue(autreFGHS/(parseInt(autreIACQ)+parseInt(autreFGHS))*100); } }); // refresh l'objet t1.callEvent("onGridReconstructed",[]); t1.attachEvent("onRowDblClicked", function(rId,cInd){ alert("Colonne de T1 index : "+cInd); }); } function fctCal(objetCalcule1,objetCalcule2,operateur,objetDestination) { var fctTotal; switch (operateur){ case "-": fctTotal = objetCalcule1.getValue() - objetCalcule2.getValue(); break; case "+": fctTotal = parseInt(objetCalcule1.getValue()) + parseInt(objetCalcule1.getValue()); break; } objetDestination.setValue(fctTotal); } //init grid and set its parameters (this part as always) var t1; afficheMontantT1(); t1LoadXml('autres'); </script> <htlm> file xml <?xml version="1.0" encoding="UTF-8"?> <rows > <row id='T1ligne1'> <cell>autres 1</cell> <cell>3320</cell> <cell>2220</cell> <cell>0</cell> <cell>133</cell> <cell>11</cell> <cell>330</cell> <cell>10</cell> <cell>80</cell> <cell>60</cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> </row> <row id='T1ligne2'> <cell>autres 2</cell> <cell>2050</cell> <cell>1582</cell> <cell>1468</cell> <cell>0</cell> <cell>1199</cell> <cell>1088</cell> <cell>111</cell> <cell>0</cell> <cell>0</cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> </row> <row id='T1ligne3'> <cell>autres 3</cell> <cell>2050</cell> <cell>1582</cell> <cell>1468</cell> <cell>0</cell> <cell>1199</cell> <cell>1088</cell> <cell>111</cell> <cell>0</cell> <cell>0</cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> </row> <row id='T1ligne4'> <cell>autres 4</cell> <cell>2050</cell> <cell>1582</cell> <cell>1468</cell> <cell>0</cell> <cell>1199</cell> <cell>1088</cell> <cell>111</cell> <cell>0</cell> <cell>0</cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> <cell></cell> </row> </rows> |