jQWidgets Forums

jQuery UI Widgets Forums Grid customizing aggregates jqxGrid

This topic contains 2 replies, has 2 voices, and was last updated by  Akshatha Raju 11 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • customizing aggregates jqxGrid #26666

    Akshatha Raju
    Participant

    Hi,

    I am using Keyboard navigation jqxGrid. I am using “showaggregates:true” and “aggregates:[‘sum’]” to show the sum of the values for a column in the grid. Here I am also customizing the aggregates by removing the default keyword “Sum:0” using the following code:

    aggregatesrenderer: function (aggregates, column, element, summaryData) {                        var renderstring = “<div class=’jqx-widget-content jqx-widget-content-” + theme + “‘ style=’float: left; width: 100%; height: 100%;background-color:#E5E5E5’>”;                     $.each(aggregates, function (key, value) {                                          renderstring += ‘<div style=”position: relative; margin: 6px; text-align: center; overflow: hidden;”> ‘ + value + ‘</div>’;                      });                           renderstring += “</div>”;    return renderstring;                                          },

    I have a first column in the grid, which dosent show any sum value in the aggregates row, here for this first column I need to display a text called ‘Total’ in the aggregates row. Is is feasible to do this?

    customizing aggregates jqxGrid #26670

    Dimitar
    Participant

    Hello Akshatha Raju,

    Yes, it is possible. Here is what you need to do with the first column:

    { text: 'First Name', columntype: 'textbox', datafield: 'firstname', width: 90, aggregates: [{ "Total": function (aggregatedValue, currentValue, column, record) { return ""; } }] },

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    customizing aggregates jqxGrid #26696

    Akshatha Raju
    Participant

    Hi Dimitar,
    Many thanks for the reply. It worked 🙂

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

You must be logged in to reply to this topic.