ClientGroupHeaderTemplate not picking up data

2 posts, 0 answers
  1. Mark
    Mark avatar
    3 posts
    Member since:
    May 2016

    Posted 08 Nov 2016 Link to this post

    Hi All,

    I'm having problems when trying to add a clickable hyperlink to my header template on my grid. The idea is to add a hyperlink with the text of ClientName from the dataitem that will call my controller and pass the ClientCode of the underlying data item.

    .Columns(columns =>
        columns.Bound(u => u.ClientName)
               .ClientGroupHeaderTemplate(Html.ActionLink("\"<#= ClientName#>\"", "blalbalba", "blabla", new { clientCode = "<#= ClientCode #>" }).ToString());
        columns.Bound(u => u.Status).Width("50px").Title("Collat").ClientTemplate("<i class='#= Status ? 'fa fa-check fa-3x red-text' : 'fa' #'/>");
        columns.Bound(u => u.Quantity).Width("100px");
        columns.Bound(u => u.Security).Title("Security");
        columns.Bound(u => u.Value).Format("{0:C}")
            .ClientGroupFooterTemplate("#=kendo.toString(sum, '£0.00') #")
             .ClientFooterTemplate("#= kendo.toString(sum, '£0.00') #").Width("100px");
        columns.Bound(u => u.CollatValue).Format("{0:C}")
            .ClientGroupFooterTemplate("#=kendo.toString(sum, '£0.00') #")
            .ClientFooterTemplate("#= kendo.toString(sum, '£0.00') #").Title("Collat. Value").Width("100px");
    .NoRecords("No records found")
    .Pageable(pageable => pageable.Refresh(true))
    .DataSource(dataSource => dataSource
    .Aggregates(aggregates =>
        aggregates.Add(p => p.Value).Sum();
        aggregates.Add(p => p.CollatValue).Sum();
    }).Group(group => group.Add(x => x.ClientName))



  2. Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 10 Nov 2016 Link to this post

    Hi Mark,

    You can find the list with the fields which can be used in the groupHeaderTemplate here -

    Danail Vasilev
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Back to Top