Completed
Last Updated: 12 Jul 2023 10:47 by ADMIN
Release R3.2023-Increment.1(19.July.2023)
John
Created on: 28 Apr 2023 20:13
Category: Grid
Type: Bug Report
8
Duplicate Sort Icons for MVC Grid

Bug report

When the Grid is set initially with a sort operation, the icon for the column will show twice in a UI for ASP.NET MVC web application.

Reproduction of the problem

Using the Kendo UI Grid template, add the sorting configuration to the dataSource:

@(Html.Kendo().Grid<Kendo.Mvc.Examples.Models.OrderViewModel>()    
    .Name("grid")
    .Columns(columns => {
        columns.Bound(p => p.OrderID).Filterable(false).Width(200);
        columns.Bound(p => p.Freight).Width(100);
        columns.Bound(p => p.OrderDate).Format("{0:MM/dd/yyyy}").Width(140);
        columns.Bound(p => p.ShipName);
        columns.Bound(p => p.ShipCity).Width(150);
    })
    .Pageable()
    .Sortable()
    .Scrollable()
    .Filterable()
    .HtmlAttributes(new { style = "height:430px;" })
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .Read(read => read.Action("Orders_Read", "Grid"))
        .Sort(s => s.Add("OrderID").Descending()))  //Added Predefined Sort
)

Current behavior

image

Expected/desired behavior

The icon should only appear once for the sorted column.

Environment

  • Kendo UI version: 2023.1.425
  • jQuery version: All Supported Versions
  • Browser: all
2 comments
ADMIN
Anton Mironov
Posted on: 12 Jul 2023 10:47

Hi Lalit,

Thank you for the details provided.

We are aware of this issue and you can resolve this problem using the following CSS rule:

<style>
    .k-cell-inner > .k-link > .k-link > .k-sort-icon{
        display: none;
    }
</style>

Here is the GitHub issue for the case(the fix should be available in R3.2023-Increment.1(19.July.2023)):

https://github.com/telerik/kendo-ui-core/issues/7319

And the item in the Feedback Portal:

https://feedback.telerik.com/aspnet-mvc/1607163-duplicate-sort-icons-for-mvc-grid

Give a try to the workaround CSS rule above and let me know if the issue is resolved.

Looking forward to hearing back from you.

Kind Regards,
Anton Mironov
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.

Lalit
Posted on: 06 Jul 2023 06:43

Did anyone find any solution to solve this issue?

I have used Kendo Grid in my project earlier. And now, I needed to add Telerik taskboard functionality which caused the similar issue of icon duplicacy on the Grid.