Datatable Footer with calculated values


I need the footer showing the right values... Is there a way?



  • edited August 10

    also you can implement own footer calculation algorithm.

    e.g. balance calculation

    webix.ui.datafilter.balanceColumn = webix.extend({
        refresh: function(master, node, value) {
            var result = 0, _val;
            var prefix = value.columnId.substr(0, value.columnId.length - 7);
                if (!obj || obj.$group || obj.$footer) return;
                _val = (obj[prefix + "Debit"] || 0) * 1 - (obj[prefix + "Credit"] || 0) * 1;
                if (isFinite(_val)) result += _val;
            if (value.format)
                result = value.format(result);
            if (value.template)
                result = value.template({ value: result });
   = "right";
            node.firstChild.innerHTML = result;
    }, webix.ui.datafilter.summColumn);
  • Hello!
    And thanks for your message.
    I have a unfortunately more complicated sample
    and it is the combination with this discussion

    Here is what I would need:

    The footer should show the right value.

    Thanks again!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!