jQWidgets Forums
jQuery UI Widgets › Forums › TreeGrid › TreeGrid Group Aggregate in header
Tagged: aggregates, grouping, treegrid
This topic contains 4 replies, has 2 voices, and was last updated by Gopre400 11 years, 1 month ago.
-
Author
-
Hi I have created the tree grid with grouping and it works the way I want except I would like to see the aggregate in the header instead of the group footer. Is there a way to do that? Or should I change hierarchy of my tree grid. I would like it to look and function like the example http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxtreegrid/index.htm#demos/jqxtreegrid/javascript-tree-grid-aggregates.htm
source =
{
datatype: “xml”,
datafields: [
{ name: ‘Contractor’ },
{ name: ‘BidTotal’, type: ‘number’ },
{ name: ‘VersionDescription’ },
{ name: ‘EstimateID’ },
],
hierarchy:
{
groupingDataFields:
[
{
name: “Contractor”
}
]
},
async: false,
record: ‘Table’,
url: ‘CNSTWebService.asmx/GetCNSTBidAmountAwardByProjectKey’,
data: { projectkey: projectkey }
};$(“#jqxgrid2”).jqxTreeGrid(
{
width: ‘100%’,
source: dataAdapter,
altRows: true,
columnsResize: false,
showSubAggregates: true,
showAggregates: true,
columns: [
{ text: ‘Contractor’, datafield: ‘Contractor’, width: 200, editable: false },
{ text: ‘Version’, datafield: ‘VersionDescription’, width: 300, editable: false },
{ text: ‘Bid Total’, datafield: ‘BidTotal’, align: ‘right’, cellsAlign: ‘right’, cellsformat: ‘c2’, editable: false, width: 100, aggregates: [‘sum’] }
]
});Data looks like this…
Contractor,VersionDescription, BidTotal, EstimateID
A & R Construction New 1320 12
A & R Construction Schedule 4 100 39
A & R Construction Schedule 5 100 40
A.M. Irrigation & Landscape New 161 12
A.M. Irrigation & Landscape Schedule 4 40 39
A.M. Irrigation & Landscape Schedule 5 40 40Hi Gopre400,
No, there’s no way to change this.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comI’m confused Peter, you can not put aggregates in group header?
Hi Gopre400,
It is not possible to put an Aggregate in the header of the TreeGrid. We usually provide examples for all the available features and such is not available in that particular widget.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThank you!
-
AuthorPosts
You must be logged in to reply to this topic.