Categories | Question details Back To List | ||
mygrid.enableAutoWidth(false) not working in Firefox enableAutoWidth(false) is not workin fine in Firefox,the width of gridbox is coming as total of column widths <div class="views" style="width:800px"> <div id="view-basic" class="view"><a href="javascript:updateView('basic')">Basic</a></div> <div class="divider">|</div> <div id="view-detail" class="view"><a href="javascript:updateView('detail')">Detail</a></div> <div class="divider">|</div> <div id="view-calendar" class="view"><a href="javascript:updateView('calendar')">Calendar Performance</a></div> <div class="divider">|</div> <div id="view-annual" class="view"><a href="javascript:updateView('annual')">Annual Performance</a></div> </div> <table id="gridbox" gridWidth="800px" imgpath="../cms/dhtmlx/treeGrid/dhtmlxGrid/codebase/imgs/" style="visibility:hidden; overflow:hidden;"> <tr> <td align="" width="0">Management Style</td> <td align="center" width="40">Asset Class</td> <td align="" width="*">Fund Name</td> <td align="" width="200">Benchmark</td> <td align="right" width="50">NAV($)</td> <td align="right" width="70">Total Distribution</td> <td align="right" width="70">Income Distribution</td> <td align="right" width="70">Capital Distribution</td> <td align="" width="80">Distribution Frequency</td> <td align="right" width="80">Distribution Date</td> <td align="right" width="40">AUM</td> <td align="right" width="40">1M</td> <td align="right" width="40">2M</td> <td align="right" width="40">YTD</td> <td align="right" width="40">1Y</td> <td align="right" width="40">2Y</td> <td align="right" width="40">3Y</td> <td align="right" width="40">4Y</td> <td align="right" width="40">5Y</td> <td align="right" width="40">10Y</td> <td align="right" width="40">Since Inception</td> <td align="right" width="80">Inception Date</td> <td align="right" width="40">2008</td> <td align="right" width="40">2007</td> <td align="right" width="40">2006</td> <td align="right" width="40">2005</td> <td align="right" width="40">2004</td> </tr> <tr> <td>Active Fundamental</td> <td> <img src="../tdam/cda/images/bullet-fixedIncome.gif" title="Fixed Income"/> </td> <td> <a href="IS_InstitutionalFundDetail?key=E16224&language=en_CA"> TD Lancaster Fixed Income Fund II <a> </td> <td>benchmark</td> <td>10.00</td> <td>1.00</td> <td>0.00</td> <td>0.00</td> <td>distribution_frequency</td> <td>08/03/2009</td> <td>2.75</td> <td>0.00</td> <td>0.00</td> <td>0.00</td> <td>0.11</td> <td>0.11</td> <td>0.11</td> <td>0.11</td> <td>0.11</td> <td>0.11</td> <td>0.11</td> <td>08/03/2009</td> <td>6.02</td> <td>7.03</td> <td>8.03</td> <td>9.03</td> <td>10.03</td> </tr> <tr> <td>Active Fundamental</td> <td> <img src="../tdam/cda/images/bullet-cashMgmt.gif" title="Cash Management"/> </td> <td> <a href="IS_InstitutionalFundDetail?key=E16225&language=en_CA"> TD11 Emerald Cdn -N <a> </td> <td>benchmark</td> <td>10.00</td> <td>1.00</td> <td>0.00</td> <td>0.00</td> <td>distribution_frequency</td> <td>08/03/2009</td> <td>2.75</td> <td>0.00</td> <td>0.00</td> <td>0.00</td> <td>0.11</td> <td>0.11</td> <td>0.11</td> <td>0.11</td> <td>0.11</td> <td>0.11</td> <td>0.11</td> <td>08/03/2009</td> <td>6.02</td> <td>7.03</td> <td>8.03</td> <td>9.03</td> <td>10.03</td> </tr> </table><script type="text/JavaScript"> var mygrid = new dhtmlXGridFromTable("gridbox"); mygrid.moveToVisibleA=mygrid.moveToVisible; mygrid.moveToVisible=function(a){ return this.moveToVisibleA(a,true); } mygrid.setEditable(false); mygrid.enableAutoWidth(true); mygrid.enableAutoHeight(true); mygrid.groupBy(0); mygrid.enableResizing("false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,"); var views = new Array(); views["basic"] = "1,2,3,4,5"; views["detail"] = "1,2,3,5,6,7,8,9,10,11"; views["calendar"] = "1,2,3,12,13,14,15,16,17,18,19,20,21,22"; views["annual"] = "1,2,3,14,23,24,25,26,27"; function updateView(id) { var cv = columnsVisibility(views[id]); mygrid.setColumnsVisibility(cv); mygrid.setSizes(); mygrid.objBox.style.overflowX="hidden"; var vs = $("div.view"); for (var i=0; i<vs.length; i++ ) { var v = vs[i]; if ( v.id == ("view-" +id) ) { $("#"+v.id).addClass("selected"); } else { $("#"+v.id).removeClass("selected"); } } } function columnsVisibility(view) { var list = view.split(","); var result = ""; for(var i=1;i<= 27 ;i++) { if ( exists(list,i) ) result +="false"; else result += "true"; result+= ","; } return result.substring(0,result.length-1); } function exists(theList, key){ var left = 0; var right = theList.length - 1; while (left <= right) { var mid = parseInt((left + right)/2); if (theList[mid] == key) return true; else if (theList[mid] < key) left = mid + 1; else right = mid - 1; } return false; } updateView('basic'); </script> Answer posted by dhxSupport on Aug 03, 2009 06:00 Unfortunately we cannot reproduce this issue locally. Please provide full example including files which you are using to initialize grid (you can send it directly to the support@dhtmlx.com) |