jQuery UI Widgets Forums Grid Grid grouping – Column summary, avarage, etc.

This topic contains 2 replies, has 2 voices, and was last updated by  tstoffel 12 years, 5 months ago.

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

  • tstoffel
    Member

    Hi there,

    I’m searching for a possibility to display more informations in a group of a grid. If a grid contains values like company name, employee name and e.g. working hours, we need to display the sum of working hours if the rows are collapsed to a group. Is there a possibility to do that?

    Thanks for answer.

    tom


    Peter Stoev
    Keymaster

    Hi Tom,

    You can customize the appearance of a Group by handling the grouprenderer function. The function should return HTML string and s called when a group is rendered. You can use it to customize the default group rendering.

    var groupsrenderer = function (text, group, expanded) {
    return "" + group + "";
    }
    $("#jqxgrid").jqxGrid(
    {
    source: source,
    groupsrenderer: groupsrenderer,
    columns: [
    { text: 'Ship Name', datafield: 'ShipName', width: 250 },
    { text: 'Ship City', datafield: 'ShipCity', width: 100 },
    { text: 'Ship Country', datafield: 'ShipCountry' }
    ],
    groupable: true,
    groups: ['ShipCity']
    });

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    tstoffel
    Member

    Hi Peter,

    it worked really great!!!

    Thank you very much for that tip!

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

You must be logged in to reply to this topic.