Advertisement
Guest User

Untitled

a guest
May 4th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. function getValueAt(column, dataTable, row) {
  2. return dataTable.getFormattedValue(row, column);}
  3. function setLabelTotal(dataTable) {//dataTable must have role: annotation
  4. var SumOfRows = 0;
  5.  
  6. for (var row = 0; row < dataTable.getNumberOfRows(); row++) {
  7. SumOfRows = 0;
  8. for (var col = 0; col < dataTable.getNumberOfColumns(); col++) {
  9.  
  10. if (dataTable.getColumnType(col) == 'number') {
  11. SumOfRows += dataTable.getValue(row, col);
  12. }
  13. if(dataTable.getColumnRole(col) == 'annotation')
  14. {dataTable.setValue(row, col, SumOfRows.toString());}
  15. }
  16. } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement