Need More Info
Last Updated: 04 May 2024 04:53 by Pinkesh
Pinkesh
Created on: 27 Apr 2024 12:33
Category: UI for ASP.NET MVC
Type: Bug Report
0
GridSortMode.Mixed not working for me, I'm using the latest version of kendo UI in MVC.

Dear team,
Recently I've updated the kendo UI.
currently I'm using the this version.

 

Here I wrote the code for testing.

// cshtml code

@(Html.Kendo().Grid<Alliant.Controllers.ProductViewModel>() .Name("mixedSort") .Columns(columns => { columns.Bound(o => o.ProductName).Width(300); columns.Bound(p => p.UnitPrice).Width(300); columns.Bound(p => p.UnitsInStock).Width(300); columns.Bound(p => p.Discontinued).Width(300); columns.Bound(p => p.Group).Width(300); }) .Pageable(pageable => pageable.ButtonCount(5)) .Sortable(sortable => sortable .AllowUnsort(true) .SortMode(GridSortMode.Mixed) .ShowIndexes(true)) .DataSource(dataSource => dataSource .Ajax() .PageSize(5) .Read(read => read.Action("Sorting_Orders_Read", "Testing")) ) )

// Controller code

public ActionResult Sorting_Orders_Read([DataSourceRequest] DataSourceRequest request)
{
    List<ProductViewModel> lstData = new List<ProductViewModel>()
    {
        new ProductViewModel(){Group="A",ProductName="A1",UnitPrice=10,Discontinued=1,UnitsInStock=50},
        new ProductViewModel(){Group="A",ProductName="B1",UnitPrice=20,Discontinued=2,UnitsInStock=60},
        new ProductViewModel(){Group="B",ProductName="C1",UnitPrice=30,Discontinued=3,UnitsInStock=70},
        new ProductViewModel(){Group="C",ProductName="D1",UnitPrice=40,Discontinued=4,UnitsInStock=80},
        new ProductViewModel(){Group="C",ProductName="E1",UnitPrice=50,Discontinued=5,UnitsInStock=90},
    };

    return Json(lstData.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}

// Model

public class ProductViewModel
{
    public string ProductName { get; set; }
    public decimal UnitPrice { get; set; }
    public int UnitsInStock { get; set; }
    public decimal Discontinued { get; set; }
    public string Group { get; set; }
}

Could you please help me to figure out the issue?

I also checked the jquery code.

// Jquery code render by kendo

3 comments
Pinkesh
Posted on: 04 May 2024 04:53
Yes thanks, Its worked fine and I did changes according to my requirement. 
ADMIN
Georgi
Posted on: 03 May 2024 12:53

Hello Pinkesh,

Could you please share the used Kendo CSS files? Are you using the latest version of the themes 7.2.1? Keep in mind that the SVG icons are relatively new, and older themes versions do not support them.

You can use our CDN to reference the themes:

<link rel="stylesheet" href="https://kendo.cdn.telerik.com/themes/7.2.1/default/default-ocean-blue.css">

Regards,
Georgi
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.

Pinkesh
Posted on: 30 Apr 2024 05:08
I solved this issue by adding kendo.all.min.js file in my project. but still unable to fetch SVG icon while sorting Grid Data. I checked SVG.dll file also Fonticon.dll file in my project. I also checked multiple CSS references and other things but still Sort icon not showing properly.
Can you please help me where and what to check in my case.