kendo-asp.net-mvc

Sorting kendo grid on multiple columns

∥☆過路亽.° 提交于 2019-11-28 07:41:02
问题 i have a kendo grid. When the page loads, by default i want to sort the grid by column1 then by column2 in descending order. Issue: Its sorting as expected however sort arrow shows up on last sorted column. So in the case below when the page loads the sort arrow is on "DueDate" instead of "DownloadDate" @(Html.Kendo().Grid<TrackingVM>() .Name("Grid") .Columns(col => { col.Bound(p => p.ID).Hidden(); col.Bound(p => p.Year); col.Bound(p => p.State); col.Bound(p => p.DueDate).Format("{0:MM/dd

How to add row number to kendo ui grid?

我与影子孤独终老i 提交于 2019-11-27 15:05:31
问题 I have a kendo ui grid in my page that has some columns. Now I want to add a column to it that shows me row number. How to I do this? Thanks. 回答1: Initialize a variable and show it in column as template: "#= ++record #" Working Demo Here is code: var record = 0; $("#grid").kendoGrid({ dataSource: { data: [{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo: "foo" },{ foo:

Kendo chart rendering very slow

↘锁芯ラ 提交于 2019-11-27 08:43:33
问题 I have kendo chart as below. I have to plot the graph which has more than 20k points. The problem i am facing here is the chart is rendering very slow. How to improve the peformance of this. Any help on this is highly appreciated? @(Html.Kendo().PanelBar() .Name("linePanelBar") //.ExpandMode(PanelBarExpandMode.Multiple) .HtmlAttributes(new { style = "width:100%;height:300px;background-color:transparent;" }) .Items(panelbar => { panelbar.Add().Text("Correlation") .Expanded(true) .Content(@<div

Make cell readonly in Kendo Grid if condition is met

天大地大妈咪最大 提交于 2019-11-26 05:29:10
问题 Let\'s say I have a data like this: [ {ID: 1, SomeForeignKeyID: 4, IsFkEnabled: true}, {ID: 2, SomeForeignKeyID: 9, IsFkEnabled: false} ] Kendo Grid is using this data: columns.Bound(m => m.ID); columns.ForeignKey(p => p.SomeForeignKeyID, ViewBag.ForeignKeys as IEnumerable<object>, \"Value\", \"Name\"); Here\'s the problem: how to make ForeignKey column editable, but only in rows, where IsFkEnabled == true? Edit mode is InCell. 回答1: Notes: this solution works for in-cell editing only (inline