How do I get rid of dupe sort icon when default sort column is defined on grid data source

1 Answer 92 Views
Grid
Michael
Top achievements
Rank 2
Iron
Iron
Iron
Michael asked on 05 Jun 2023, 11:03 AM

In the UI for ASP.NET MVC build 2023.1.425 build we are seeing an odd behavior where there is a duplicate sort icon on the column that we have set as the initial sort in the grid datasource definition section (ref 1st screenshot).  In comparing the generated HTML for the UI for ASP.NET MVC and UI for ASP.NET CORE  (both 2023.1.425) where both have the same grid datasource initial sort set there is a variance between the HTML generated/shown for the header column in that an extra "k-icon-sort" span tag is being added (ref and compare 2nd and 3rd screenshots).  The grid datasource default sort column is defined as ".Sort(x => x.Add("EmployeeName").Ascending())" and the grid Sortable configuration is defined as ".Sortable(s => s.SortMode(GridSortMode.SingleColumn))" in either of our ASP.NET MVC or ASP.NET CORE projects so that is not a variance and both use the the "classic-silver.css" theme so that too is not a difference so my only thought is that the generation of HTML or applying of style classes on sort action (via some kendo-xxx.js file?) is the difference and the reason why the MVC version shows the dupe icon but not the CORE version.

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Eyup
Telerik team
answered on 08 Jun 2023, 09:58 AM

Hi Michael,

 

Thank you for writing to us.

Yes, we are aware of this issue with the MVC Grid and it has already been fixed but the fix will come public after the next release.

Until now, you can fix it with this CSS rule:

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

Excuse us for the inconvenience this has caused you.

 

Regards,
Eyup
Progress Telerik

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

Michael
Top achievements
Rank 2
commented on 23 Jun 2023, 10:17 AM | edited

Note that it may also be necessary to add the following CSS rule for the k-sort-order attribute (for multi-column sorting configurations) :


<style>

.k-cell-inner > .k-link > .k-link > .k-sort-order {
    display: none;
}

</style>

Tags
Grid
Asked by
Michael
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Eyup
Telerik team
Share this question
or