This is a migrated thread and some comments may be shown as answers.

Kendo grid with default multiple column grouping

5 Answers 582 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Quynh
Top achievements
Rank 1
Quynh asked on 25 Mar 2015, 06:49 PM
Hi, I have a grid with set default multiple coulmn grouping, like the attached file image. how do I hide the "grand" total footer? (circle in red)
Thanks,
Quynh

5 Answers, 1 is accepted

Sort by
0
Quynh
Top achievements
Rank 1
answered on 25 Mar 2015, 06:50 PM
attached file
0
Quynh
Top achievements
Rank 1
answered on 25 Mar 2015, 06:56 PM
here is my codes, see this attached mig instead, the above doesn't have the "circle",  I want to hide the "grand total" number (200)

  grid = $("#grid").kendoGrid({
dataSource: {
data: data.Data,
group: [{ field: "STUDY", aggregates: [{ field: "ALLOCATION", aggregate: "sum" }] }, { field: "ROLE", aggregates: [{ field: "ALLOCATION", aggregate: "sum" }] }]


},
columns: [{
field: "ALLOCATION_ID",
title: " ",
template: "<img id='imgDelete' src='" + getUrl() + "/Images/delete.gif' onclick='deleteAllocation(#= ALLOCATION_ID #)'>",
width: 25,
}, {
field: "CRA_NAME",
title: "Resource Name",
width: 150
}, {
field: "ROLE",
title: "Role",
template: "<label id='Role'>#=ROLE#</label>",
width: 100
}, {
field: "ALLOCATION",
title: "Allocation",
template: "<input id='Allocation' value='#if (ALLOCATION == 0) {##=''##} else {##=ALLOCATION##}#' style='width:50px'/>",
width: 100,
aggregates: ["sum"], groupFooterTemplate: "Total: #=sum#"

}, {
field: "ALLOCATED_TS",
title: "Allocated On",
type: "date",
format: "{0:dd-MMM-yyyy}",

width: 100,


}, {
field: "ALLOCATED_BY",
title: "Allocated By",

width: 100,


}, {
field: "COMMENTS",
title: "Public Comments",
template: "<img class='comments' id='imgComments' src='" + getUrl() + "/Images/view-note.png'><label id='lblComments' style='display:none'></label>",
width: 100
}, {
field: "COMMENTS",
title: "Internal Comments",
template: "<img id='imgInternal' src='" + getUrl() + "/Images/view-note.png'>",
width: 100,
}, {
field: "USER_ID",
hidden: true,
template: "<label id='User'>#=USER_ID#</label>"
}, {
field: "CLINICAL_STUDY_ID",
hidden: true,
template: "<label id='Study'>#=CLINICAL_STUDY_ID#</label>"
}],
dataBound: onDataBound,

groupable: false,
sortable: true,
height: $(window).height() - 250,
});
0
Boyan Dimitrov
Telerik team
answered on 27 Mar 2015, 09:37 AM

Hello Quynh,

Please remove the  groupFooterTemplate: "Total: #=sum#" from the ALLOCATION field. 

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Quynh
Top achievements
Rank 1
answered on 31 Mar 2015, 06:56 PM
Hello,
But it will remove all the totals, I want the total under ROLE, but I don't want the total under STUDY, basically it group by STUDY then ROLE, but I only want the ROLE subtotal. how do I hide the STUDY total
Thanks,
Quynh
0
Boyan Dimitrov
Telerik team
answered on 02 Apr 2015, 02:35 PM

Hello Quynh,

It is possible to add JavaScript code in the template as shown in the example at the bottom of this article. I would suggest including some custom logic to hide the Study total.  

Regards,
Boyan Dimitrov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Quynh
Top achievements
Rank 1
Answers by
Quynh
Top achievements
Rank 1
Boyan Dimitrov
Telerik team
Share this question
or