kendo-grid

Reloading/refreshing Kendo Grid

人盡茶涼 提交于 2019-11-26 06:05:19
问题 How to reload or refresh a Kendo Grid using Javascript? It is often required to reload or refresh a grid after sometime or after a user action. 回答1: You can use $('#GridName').data('kendoGrid').dataSource.read(); <!-- first reload data source --> $('#GridName').data('kendoGrid').refresh(); <!-- refresh current UI --> 回答2: I never do refresh . $('#GridName').data('kendoGrid').dataSource.read(); alone works for me all the time. 回答3: $('#GridName').data('kendoGrid').dataSource.read(); $('

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