jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Group footer (for sub-totals, etc.)??
Tagged: angular grid, grid, grid group footer, vue grid
This topic contains 8 replies, has 5 voices, and was last updated by Peter Stoev 6 years, 8 months ago.
-
Author
-
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!
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 StoevjQWidgets Team
http://www.jqwidgets.comIs this functionality now available for the footer’s?
Is Group footer for sub-totals functionality avaiable ?
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 StoevjQWidgets Team
http://www.jqwidgets.comI 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 });
});Is virtualmode: true, is possible without pageable: true,
when we set pageable: false,
getting error
“grouping” in “virtualmode” without paging is not supported!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 -
AuthorPosts
You must be logged in to reply to this topic.