jQWidgets Forums

jQuery UI Widgets Forums Grid Group footer (for sub-totals, etc.)??

This topic contains 8 replies, has 5 voices, and was last updated by  Peter Stoev 6 years, 8 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • Group footer (for sub-totals, etc.)?? #7976

    wwest
    Member

    Is there a way to show a footer for each group level (that I would use to should sub totals for thet grouping)? Kendo has the concept of a group footer, but jqxgrid is much more feature rich and faster, so I would like to use jqxgrid for this purpose…

    thanks!

    Group footer (for sub-totals, etc.)?? #8017

    Peter Stoev
    Keymaster

    Hi wwest,

    The requested functionality is not still supported. At present, it is possible to customize the Group’s header and return custom HTML. If you want to go with this option, you need to use the Grid’s ‘groupsrenderer’ property. It should point to a function which returns the HTML to be rendered.

    Example:

    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


    drv232
    Participant

    Is this functionality now available for the footer’s?


    Peter Stoev
    Keymaster

    Hi drv232,

    No, it is not.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Group footer (for sub-totals, etc.)?? #102428

    Abbas
    Participant

    Is Group footer for sub-totals functionality avaiable ?

    Group footer (for sub-totals, etc.)?? #102435

    admin
    Keymaster

    The functionality is available in the current version of our Grid component. Demo: https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/grid-grouping-aggregates.htm?material.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Group footer (for sub-totals, etc.)?? #102452

    Abbas
    Participant

    I am using the virtualmode: true, Property because we need to create url in rendergridrows .
    We are facing problem Sum of Group total is same as sum of Grand Total .
    Could you please solution

    $(“#grid”).jqxGrid(
    {

    source: dataAdapter,
    groupable: true,

    selectionmode: ‘singlecell’,
    groupsexpandedbydefault: true,
    showgroupaggregates: true,
    showstatusbar: true,
    showaggregates: true,
    statusbarheight: 25,
    groups: [‘price’],
    pageable: true,
    virtualmode: true,
    width: ‘100%’,
    Height: ‘100%’,
    rendergridrows: function (obj) {
    var btnDiaryHtml = “”;
    globaldata = obj.data;
    obj.data = Object.keys(obj.data).map(function (key) {
    return obj.data[key];
    });
    if (obj.data.length > 0) {
    $.each(obj.data, function (index, item) {
    obj.data[index].Name = (item.Name || ”);
    });
    }
    return obj.data;
    },
    columns: [
    { text: ‘First Name’, aggregates: [“count”], datafield: ‘firstname’, width: 100 },
    { text: ‘Last Name’, groupable: true, aggregates: [“count”], datafield: ‘lastname’, width: 100 },
    { text: ‘Name’, groupable: true, aggregates: [“count”], datafield: ‘Name’, width: 100 },
    { text: ‘Product’, groupable: true, columntype: ‘dropdownlist’, datafield: ‘productname’, width: 200 },
    { text: ‘Quantity’, datafield: ‘quantity’, aggregates: [“sum”], width: 70, cellsalign: ‘right’ },
    { text: ‘Price’, datafield: ‘price’, aggregates: [“sum”], cellsalign: ‘right’, width: 100, cellsformat: ‘c2’ },
    {
    text: ‘Total’, datafield: ‘total’, aggregates: [“sum”], cellsalign: ‘right’, cellsformat: ‘c2’,
    cellsrenderer: function (row, column, value, defaultRender, column, rowData) {
    if (value.toString().indexOf(“Sum”) >= 0) {
    return defaultRender.replace(“Sum”, “Total”);
    }
    },

    }
    ]
    });
    $(“#grid”).jqxGrid({ pageable: false });
    //_gridObject.jqxGrid(‘showgroupsheader’, false);
    $(“#grid”).jqxGrid({ rowsheight: 50 });
    });

    Group footer (for sub-totals, etc.)?? #102453

    Abbas
    Participant

    Is virtualmode: true, is possible without pageable: true,

    when we set pageable: false,
    getting error
    “grouping” in “virtualmode” without paging is not supported!

    Group footer (for sub-totals, etc.)?? #102459

    Peter Stoev
    Keymaster

    Hi Abbas,

    Grouping in virtual mode without paging i.e virtual mode with scrolling is not supported functionality. The reason is that data should be grouped when it’s loaded and in scrolling mode, data is loaded all the time. If we group data loaded on demand, the information displayed in these groups will be wrong as it will group only data from the current view. The sub-totals will be wrong, too because these will be sub-totals of the current view only.

    Regards,
    Peter

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

You must be logged in to reply to this topic.