Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getValueAt(column, dataTable, row) {
- return dataTable.getFormattedValue(row, column);}
- function setLabelTotal(dataTable) {//dataTable must have role: annotation
- var SumOfRows = 0;
- for (var row = 0; row < dataTable.getNumberOfRows(); row++) {
- SumOfRows = 0;
- for (var col = 0; col < dataTable.getNumberOfColumns(); col++) {
- if (dataTable.getColumnType(col) == 'number') {
- SumOfRows += dataTable.getValue(row, col);
- }
- if(dataTable.getColumnRole(col) == 'annotation')
- {dataTable.setValue(row, col, SumOfRows.toString());}
- }
- } }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement