Last Updated: 06 Feb 2024 16:12 by Garry
Created on: 06 Feb 2024 16:12
Category: Grid
Type: Bug Report
Incorrect rendering of the Grid's th content with HeaderTemplate set

Bug report

The rendering (structure and order of elements) of the th element of a column, for which a HeaderTemplate is set, does not match the Kendo UI Grid's rendering in a similar scenario. Prerequisites: HeaderTemplate, Sortable, Filterable enabled. For more context, see Ticket ID: 1639834.

Reproduction of the problem

Check the rendering of the header of the second column:

    .Columns(columns => {
        columns.Bound(p => p.OrderID).Filterable(false).Width(100);
        columns.Bound(p => p.Freight).HeaderTemplate("<span class='k-link'>My Template</span>");
        columns.Bound(p => p.OrderDate).Format("{0:MM/dd/yyyy}").Width(140);
        columns.Bound(p => p.ShipName);
        columns.Bound(p => p.ShipCity).Width(150);
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
        .Read(read => read.Action("Orders_Read", "Grid"))

Current behavior

The content of the th is the following:

<a aria-hidden="true" class="k-grid-filter-menu k-grid-header-menu">
<span class="k-link">

Expected/desired behavior

The th content should be rendered as follows:

<span class='k-cell-inner'>
    <span class='k-link'>
    <a aria-hidden='true' class='k-grid-filter-menu k-grid-header-menu'>

It should match the Kendo UI Grid's rendering: https://dojo.telerik.com/oTalIGir/8


  • Kendo UI version: 2024.1.130
  • jQuery version: x.y
  • Browser: [all]