jQWidgets Forums

jQuery UI Widgets Forums Grid aggregates without words

This topic contains 4 replies, has 3 voices, and was last updated by  kakao 11 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • aggregates without words #7681

    Can I show aggregates without words like “Count”, “Sum”?
    I need only numbers.

    aggregates without words #7682

    Peter Stoev
    Keymaster

    Hi nikolayalmaty,

    You can customize the aggregates rendering. In order to achieve that, you need to create a function called aggregatesrenderer which returns the displayed HTML.

     text: 'Price',
    datafield: 'price',
    cellsalign: 'right',
    cellsformat: 'c2',
    aggregates: [{
    'Total': function(aggregatedValue, currentValue, column, record) {
    var total = currentValue * parseInt(record['quantity']);
    return aggregatedValue + total;
    }}],
    aggregatesrenderer: function(aggregates) {
    var renderstring = aggregates["Total"];
    return '<span style="margin-top: 4px; float: right;">' + renderstring + '</span>';
    }}

    Here’s a sample with source code:

    http://jsfiddle.net/jqwidgets/PHhpR/

    Best Wishes,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    aggregates without words #7683

    Thank you, Peter!

    aggregates without words #51826

    kakao
    Participant

    Is there any possibility to show this aggregatesrenderer on print?
    Default aggregates are showing, but mentioned method didn’t show in print window.

    aggregates without words #51848

    kakao
    Participant

    My problem is solved, now everything is displayed.
    I didn’t use aggregatesrenderer and all necessary values put in aggregates: [{ ‘<b>Total:</b>’: function (aggregatedValu …

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.