5 Answers, 1 is accepted
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,
});
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
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
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
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!