• Is it possible to get column totals displaying?

    By Jonathan Roberts 2 decades ago

    I've implemented this excellent code on a number of web views and its great. However I cannot seem to get totals displaying properly. I either get only the total totals at the bottom or no totals at all.

    Thanks

    • By Jonathan Roberts 2 decades ago

      I've been having a look at this and the totals are not displaying because when the row is draw if it is a category row only the first value is processed. The colspan is then set to the number of columns as is the looping integer so nothing more is done on that row.



      jsNotesView2.1.5 needs to be modified to check if the columns have values even if it is a catergory view.



      Modifying the code as below proves the concept as the totals are now displayed, unfourtunatly the layout has gone nuts.


                  (rem out this line)   if(entry.isCategory) td.colSpan = this.visibleColumns - x;<br/>
                      <br/>
                  (change this line to)<br/>
                                      if(entry.isCategory) x = x//this.columns.length;<br/>
                      else if(x &lt; this.columns.length - 1)td.style.width = this.columns[x].width;<br/>
                  }else{<br/>
      



      I'm not a Javascript programmer but I'm going to try and create an 'elegent solution' to this. I'll keep you informed