We've recently undertaken an upgrade from Kendo UI 2013.2.716 to 2016.3.1118 and we've noticed some issues for our drop down lists. Some of our scenarios call for drop down lists with empty ("[]") data sources until other operations cause them to be filled, or they remain hidden.
Upon changing versions we've noticed that upon the initWidget method being called for that drop down list, the data source is being parsed as a string ("[]") when previously it was being recognised as an empty array. Some investigation and comparison of the two versions led me to a particular regular expression that had changed between the versions in parseOption:
2013 - jsonFormatRegExp = /^\{(\d+)(:[^\}]+)?\}/
2016 - jsonFormatRegExp = /^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]*\]$/
In 2013 this was not matching the empty array "[]", causing the code path to return it from a function (well, an "evil") to the initWidget method - now that it's matching, however, it's passing the string value back which is causing errors later in the code with the [] being used in getter names. Is there another way we should be populating this field? How can we get this version to recognise this value as the empty array it was intended to be?
<input class=" roadmap" data-option-label="Select" data-role="dropdownlist" data-source="[]" data-text-field="Text" data-value-field="Value" id="xxx" name="yyy" style="width:100%;" type="text" value="" />

@(Html.Kendo().Grid<MyModel>() .DataSource(ds => ds .Custom() .Batch(false) .Schema(schema => schema.Parse(@<text>parseData</text>)) .Transport(r => r.Read(c => c.Action("GetStuff", "MyController", new { prop = Model.prop }) .Data("getExtraData()").Type(HttpVerbs.Post))) .PageSize(1) .ServerPaging(true) )
The getExtraData() method runs the first time the grid is loaded. I want to refresh the grid later, so I use this c
$('#messagesgrid').data('kendoGrid').dataSource.read();$('#messagesgrid').data('kendoGrid').refresh();
The method getExtraData() has changed, so when it refreshes I want it to call this method again to attach the data to my request. However the method does not run even though the grid is refreshed.
How can I make sure that it runs every time the grid is updated?

For batch mode (inCell editing), when a value is changed in a cell, is there an event that can be used where I can know what field changed and what the previous value was?
I asked about this several years ago, so I'm asking now again in 2017 hoping you have an answer.

During user operations, we refresh the datasource contents and reload the treelist. If our users have a row selected, we need to reselect that row. If a child row was last selected, we need to expand its parent and select the child. I've looked through the docs, but all it shows is how to select a row based on the index; I also see nothing on how to expand the parent of a child row.
You can see my code in this dojo: http://dojo.telerik.com/epOQe/3
After running it, select a row and then click the Refresh button; the point is that the selected row should be selected after the refresh *and* if be visible (e.g., if it's a child node, the parent should be expanded as well). The selected row remains selected, but if it's a child row, the parent row won't be expanded. (I based this off the code found here.)
So my questions are thus:
1) Why won't the parent row expand?
2) Is there a way to automatically expand the parent when a child is selected?
Any guidance would be greatly appreciated!
Hi there,
I'm having a problem with Kendo Grid UI and setOptions. When I setOptions, hidden fields have an extra display:none attribute added. I've attached an image of my options variable (data.selectedGridState) compared with the the getOptions value directly after the setOptions command. I believe they should be identical. Could you advise?
My code looks like this:
var selectedGrid = $(jQuerySelectors.selectedMembersGrid).data("kendoGrid");
selectedGrid.setOptions(JSON.parse(data.selectedGridState));
Kind regards,
Karl
Hi --
We have a grid with an action button in the column. When the user clicks the button this code executes.
function showDetails(e) { e.preventDefault(); var dataItem = this.dataItem($(e.currentTarget).closest("tr")); var grid = $("#gridEnrollments").data("kendoGrid"); grid.select($(e.currentTarget).closest("tr")); selectedIndex = grid.select().index();}
The selected row index value is now in the selectedIndex variable.
I would like to then be able to do grid.select(selectedIndex +1).
However, when I do this the selected row is the one above as opposed to below the currently selected row.
How can I achieve what I am looking to do?
Thanks
Rich
Hi,
I'm using Scatter Chart.
However , when I have a large dataset (around 20,000 data points).
The chart renders very slowly (around 20 seconds)
Any ideas ? (I already tried to render it as canvas)
Thanks
Sagi
Hi,
Is there any way to block the onchange method of the spreadsheet conditionally? My use case is below:
When our users click on the spreadsheet, we getthe top selected row and add some dropdowns (validations) to it (I cannot do this on spreadsheet initialisation as the speed is too slow). However, this forces the onchange method to fire a number of times. The onchange method watches certain columns, as when users change the actual value we need to recalculate things. Is there any way in the onchange method, to work out if the "change" was just adding validation to the cell, as this is all we do in the onclick method?
Thanks
Marc