unable to get the ClientFooterTemplate to show

5 posts, 0 answers
  1. James
    James avatar
    12 posts
    Member since:
    Jun 2015

    Posted 27 Apr Link to this post

    hi,

    i cannot get the total sum to show in the ClientFooterTemplate,  below is the code.  please let me know what i need to change.  

    the ClientGroupFooterTemplate does show, but the ClientFooterTemplate does not.

    thanks.

        @(Html.Kendo().Grid<VolumeViewModel>
            ()
            .Name("ReportGrid")
            .Columns(columns =>
            {
                columns.Bound(o => o.Firm).Width(130).Locked(true);
                columns.Bound(o => o.Collat).Width(70);
                columns.Bound(o => o.UserName).Width(100).Title("User");
                columns.Bound(o => o.Product).Title("Product Type").Width(110);
                columns.Bound(o => o.Symbol).Title("Symbol").Width(100);
                columns.Bound(o => o.Volume).Title("Amount (USD)").Width(150).Format("{0:n0}")
                        .ClientGroupFooterTemplate("Sub-total: #= kendo.toString(sum, \"n2\")#")
                        .ClientFooterTemplate("Period Total: #= kendo.toString(sum, \"n2\")#");
            })
            .ToolBar(tools => tools.Excel())
            .Excel(excel => excel
            .FileName("RevenueReport.xlsx")
            .Filterable(true)
            .AllPages(true)
            .ProxyURL(Url.Action("ExcelExportSave", "ReportGrid"))
            )
            .Sortable()
            .AllowCopy(true)
            .ColumnMenu()
            .Groupable(group => group.ShowFooter(true))
            .Resizable(resize => resize.Columns(true))
            .Scrollable(scrollable => scrollable.Virtual(true))
            .Scrollable(s => s.Height("500px"))
            .Filterable(filterable => filterable
            .Extra(true)
            .Operators(operators => operators
            .ForNumber(n => n.Clear()
            .IsEqualTo("Is Equal To")
            .IsGreaterThan("Is Greater Than")
            .IsGreaterThanOrEqualTo("Is Greater Than Or Equalt To")
            .IsLessThan("Is Less Than")
            .IsLessThanOrEqualTo("Is Less Than Or Equal To")
            )
            .ForDate(d => d.Clear()
            .IsEqualTo("Is Equal To")
            .IsGreaterThan("Is Greater Than")
            .IsGreaterThanOrEqualTo("Is Greater Than Or Equal To")
            .IsLessThan("Is Less Than")
            .IsLessThanOrEqualTo("Is Less Than Or Equal To"))
            )
            )
            .Selectable(selectable => selectable
                .Mode(GridSelectionMode.Multiple)
                .Type(GridSelectionType.Row)
            )
            .AutoBind(false)
            .DataSource(dataSource => dataSource
                .Ajax()
                .PageSize(100)
                .Model(model =>
                {
                    model.Id(p => p.Firm);
                    model.Field(p => p.Collat).Editable(false);
                    model.Field(p => p.UserName).Editable(false);
                    model.Field(p => p.Product).Editable(false);
                    model.Field(p => p.Symbol).Editable(false);
                    model.Field(p => p.Volume).Editable(false);
                })
            .Read(read => read.Action("Volume", "ReportGrid")
            .Data("GetGridData"))
            .Group(groups =>
            {
                groups.Add(model => model.Firm);
                groups.Add(model => model.Collat);
                groups.Add(model => model.UserName);
                groups.Add(model => model.Product);
                groups.Add(model => model.Symbol);
            })
            .Aggregates(aggregates =>
            {
                aggregates.Add(model => model.Volume).Sum();
            })

            .Events(events => events.Error("onError").Change("onChange"))
            ))

  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 29 Apr Link to this post

    Hi James,

    It seems that the ClientFooterTemplate  is shown and calculated correctly. Please verify that there are no javascript errors.

    Regards,
    Hristo Valyavicharski
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. James
    James avatar
    12 posts
    Member since:
    Jun 2015

    Posted 24 May in reply to Hristo Valyavicharski Link to this post

    verified.  no javascript errors.  
  5. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 26 May Link to this post

    Hi James,

    Please find the attached project. Try to modify it and send it back to me.

    Thanks.

    Regards,
    Hristo Valyavicharski
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. James
    James avatar
    12 posts
    Member since:
    Jun 2015

    Posted 31 May in reply to Hristo Valyavicharski Link to this post

    no javascript errors.
Back to Top
UI for ASP.NET MVC is VS 2017 Ready