MVC Grid: ClientFooterTemplate() not working

2 Answers 22 Views
Grid
Cristian-Leonard
Top achievements
Rank 1
Iron
Cristian-Leonard asked on 29 Feb 2024, 01:13 PM

Hello,

I am currently using Kendo version 2024.1.130 with ASP.NET core Razor Pages.

In this version I am unable to get a sum aggregate to show. Nothing woks, not even a "ABC" string. The footer is visible and all columns contain a  

Relevant Code:

@(Html.Kendo().Grid<ItemViewModel>()
    .Name("grid")
    .Filterable()
    .Sortable()
    .Scrollable()
    .Columns(columns =>
    {
        //...
        columns.Bound(c => c.ExtendedPrice).Title("Extended Price").Format("{0:n0}").ClientFooterTemplate("#=sum#");
        //...
    })
    .DataSource(dataSource => dataSource
        .Ajax()
        .Aggregates(aggregates =>
        {
            aggregates.Add(p => p.ExtendedPrice).Sum();
        })
        .Read(read => read.Action("GetList", "Bom").Type(HttpVerbs.Get).Data("getParameters"))
        .Events(e => e.Error("showSimpleModelStateErrors").RequestStart("clearErrors").RequestEnd("gridDataLoaded"))
    )

Cristian-Leonard
Top achievements
Rank 1
Iron
commented on 29 Feb 2024, 01:24 PM

Noticed that .ClientFooterTemplate("#=sum#") has no effect. I am not getting an id in the DOM. Probably related.

2 Answers, 1 is accepted

Sort by
0
Accepted
Cristian-Leonard
Top achievements
Rank 1
Iron
answered on 07 Mar 2024, 11:56 AM

This was a "me" problem: I am developing on an M3 Mac with Parallels + Windows ARM. It seems that in this specific combination, some code changes are not properly updated in Chrome. However if I switch to Edge, this is working as expected.

I doubt this is a Telerik issue, so sorry for wasting your time.

Alexander
Telerik team
commented on 12 Mar 2024, 06:20 AM

Hi Christian-Leonard,

Thank you for keeping the community posted with your findings. Indeed, if the behavior is not reciprocated in each of the browsers, we might be looking at an infrastructural configuration that is causing the rather peculiar.

I hope all is well!

 

0
Stoyan
Telerik team
answered on 05 Mar 2024, 01:11 PM

Hello Cristian-Leonard,

I've tested a scenario similar to the one you have share but I wasn't able to reproduce the reported issue.

For this reason I am attaching an isolated sample project that showcases the behavior of the Grid with a ClientFooterTemplate. Please modify the project to reproduce the issue and send it back for me to investigate.

Thank you for your cooperation in advance.

Regards,
Stoyan
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.
Tags
Grid
Asked by
Cristian-Leonard
Top achievements
Rank 1
Iron
Answers by
Cristian-Leonard
Top achievements
Rank 1
Iron
Stoyan
Telerik team
Share this question
or