Unplanned
Last Updated: 24 Jun 2024 15:40 by Łukasz
Łukasz
Created on: 24 Jun 2024 15:40
Category: Grid
Type: Bug Report
0
Grid missing Html elements in the rendered header when Sortable is disabled

Bug report

The specific here is the disabled Sortable configuration. With Sortable enabled, the rendering on the header content is correct.
Similar issue: #6955

Reproduction of the problem

  1. Initialize a Grid without setting Sortable:
@(Html.Kendo().Grid<TelerikMvcApp1.Models.OrderViewModel>()
    .Name("grid")
    .Columns(columns =>
    {
        columns.Bound(p => p.OrderID).Filterable(false).Width(200);
        columns.Bound(p => p.Freight).Width(200);
        columns.Bound(p => p.OrderDate).Format("{0:MM/dd/yyyy}").Width(200);
        columns.Bound(p => p.ShipName).Width(200);
        columns.Bound(p => p.ShipCity).Width(200);
    })
    .Pageable()
    .Scrollable()
    .Filterable()
    .HtmlAttributes(new { style = "height:550px;" })
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .Read(read => read.Action("Orders_Read", "Grid"))
    )
)
  1. Inspect the rendering of a column header

Current behavior

The column name is nested directly in the th element, instead of being wrapped in additional elements like in the Kendo UI for jQuery Grid or in the Grid for ASP.NET Core.

Expected/desired behavior

The column name should be wrapped in additional span elements with classes k-cell-inner, k-link, k-column-title:

<span class="k-cell-inner">
    <span class="k-link">
        <span class="k-column-title">Ship Name</span>
    </span>
    ... anchor element...
</span>

Environment

  • Kendo UI version: 2024.2.514
  • jQuery version: x.y
  • Browser: [all]
0 comments