kendo-ui

How can I use nested Json to populate Kendo UI grid?

主宰稳场 提交于 2019-11-26 21:03:58
问题 How can I populate Kendo UI grid with nested JSON. I mean my JSON is like var myJson: [{"oneType":[ {"id":1,"name":"John Doe"}, {"id":2,"name":"Don Joeh"} ]}, {"othertype":"working"}, {"otherstuff":"xyz"}] }]; and I want Kendo UI Grid with columns as Id, Name, OtherType and OtherStuff. Thanks in advance.! 回答1: For complex JSON structures, you might use schema.parse var grid = $("#grid").kendoGrid({ dataSource : { data : [ { "oneType": [ {"id": 1, "name": "John Doe"}, {"id": 2, "name": "Don

How to change columns set of kendo grid dynamically

筅森魡賤 提交于 2019-11-26 19:20:44
问题 I am trying to change the columns collection of my Kendo grid in the below way. var grid = $("#grid").data("kendoGrid"); $http.get('/api/GetGridColumns') .success(function (data) { grid.columns = data; }) .error(function (data) { console.log(data); }); This is changing the column collection but not reflecting immediately in my grid. But when I try to perform some actions in the grid (like grouping), then my new column set is appearing. Please let me know how can I achieve this. Regards, Dilip

Unable to locate SVG elements through xpath on Kendo UI chart

给你一囗甜甜゛ 提交于 2019-11-26 18:38:32
问题 I did try some of xpaths but seems no luck. I want to click on country and then graph , Given below screenshot : Website URL is : https://demos.telerik.com/kendo-ui/bar-charts/column I tried xpaths : //text(text()='India') //g//text(text()='India') 回答1: As the desired elements are SVG Elements you need to consider the namespace and induce WebDriverWait for the desired element to be clickable and to click on the first bar within the graph you can use the following solution: Code Block: from

Reloading/refreshing Kendo Grid

帅比萌擦擦* 提交于 2019-11-26 18:23:26
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. Jaimin You can use $('#GridName').data('kendoGrid').dataSource.read(); <!-- first reload data source --> $('#GridName').data('kendoGrid').refresh(); <!-- refresh current UI --> Purna Pilla I never do refresh . $('#GridName').data('kendoGrid').dataSource.read(); alone works for me all the time. Oxon $('#GridName').data('kendoGrid').dataSource.read(); $('#GridName').data('kendoGrid').refresh(); In a recent project, I had to update the Kendo UI Grid based

How to implement Server side paging in Client side Kendo UI grid in asp.net mvc

江枫思渺然 提交于 2019-11-26 12:11:37
问题 Can anyone tell me how can I implement server-side paging with client-side Kendo UI Grid? 回答1: UPDATE: We have released an open source .NET library which makes paging, sorting an filtering a lot easier. The grid will send the current pageSize and skip once you set serverPaging to true . On the server side you should page your data using the provided info and return it together with the total number of items. Here is a code snippet: Action public ActionResult Products(int pageSize, int skip) {

Uncaught Error: Unexpected directive &#39;MyComboBox&#39; imported by the module &#39;AppModule&#39;. Please add a @NgModule annotation

折月煮酒 提交于 2019-11-26 10:28:07
问题 I\'ve a custom component (MyComboBox) which has kendo-combobox inside. When I use my core module, webpack compilation ends successfully but chrome throws the following error: Uncaught Error: Unexpected directive \'MyComboBox\' imported by the module \'AppModule\'. Please add a @NgModule annotation. Here is my AppModule : import { MyComboBox } from \'@my/core/control/MyComboBox\'; @NgModule({ declarations: [ AppComponent, MyComboBox ], imports: [ BrowserModule, FormsModule, HttpModule,

Kendo UI Grid multi level hierarchy (n-levels of hierarchy)

喜夏-厌秋 提交于 2019-11-26 09:59:42
问题 I am using the Kendo UI Grid and currently display parent child records appropriately. However, it turns out that i will actually need to display n-levels vs. strictly parent-child. Not every record will have children, but some will have multiple levels. Current grid code: var jgrid = $(\"#boxesgrid\").kendoGrid({ columns: [ { field: \"JobId\", hidden: true }, { field: \"PercentComplete\", hidden: true }, { field: \"JobStatusId\", hidden: true }, { field: \"AppName\", title: \"App\", template

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