We need to run some user confirmations for certain changes that occur with our incell-edited table. Our standard confirmation dialog is an async dialog, not Window.confirm(), which seems to cause some problems.
If we were just using the synchronous confirm(), then we could easily preventDefault() upon rejection, but the async confirm comes too late for that.
Additionally, there are times that we want to modify the value that the user enters as part of the save() call, but I haven't figured out how to get that to work.
In this fiddle (http://jsfiddle.net/LMFinney/3qkpLjvt/2/), I've simulated the async confirm dialog by wrapping confirm() in a Promise.resolve(). And I've simulated changing the value of the user-entered data by doubling odd entries. In this case, preventDefault() doesn't work because it's too late, and setting the modified value actually clears the value instead.
Is there another approach for these two issues?
I have a simple grid with filter (row mode), and it seems the grid fails to add new items when the filter is applied. Clicking the "Add new record" does nothing, not even triggering the grid `edit` event.
I have found this question on StackOverflow: http://stackoverflow.com/questions/17840312/cant-add-new-object-to-kendoui-grid-if-filter-is-applied-to-any-column but this seems an overly-complicated solution to a simple problem. Is there a more direct way of allowing the creation of new items while filter is on? I don't mind if I'll have to clear all filter fields, as long as the user doesn't have to do so manually.
I have a Kendo UI grid control that has three columns: Price Code, Description, and Quantity. The Price Code uses a DropDownList as a custom editor that changes the value of the Description field once selected. The problem that I'm having is that although the Description field changes when the DropDownList is changed, the Quantity field is reset to 0 when any of the fields in the row are changed. Here is my code:
<div id="workorderdetails" style="padding-top: 2em;"> <div id="grid"></div> <script> $(document).ready(function () { $("#client").kendoAutoComplete({ template: "<span class='client-id'>#= AccountNumber #</span> <span class='branch-id'>#= (Branch == null) ? ' ' : Branch #</span> <span class='department-id'>#= (Department == null) ? ' ' : Department #</span> #= Name #", dataTextField: "Name", height: 520, dataSource: { type: "json", transport: { read: "http://localhost:53786/api/client" }, schema: { model: { fields: { AccountNumber: { type: "number" }, Branch: { type: "string" }, Department: { type: "string" }, Name: { type: "string" } } } }, pageSize: 80, serverPaging: true, serverFiltering: false } }); // create DatePicker from input HTML element $("#datepicker").kendoDatePicker({ format: "dddd, MMMM d, yyyy" }); $("#grid").kendoGrid({ dataSource: { transport: { read: { url: "http://localhost:53786/api/workorder/1/workorderdetails", dataType: "json" } }, schema: { model: { fields: { WorkOrderID: { type: "number" }, ShortCode: { defaultValue: { PriceCodeID: 1436, ShortCode: "REF3" } }, Description: { type: "string" }, Quantity: { type: "number" } } } } }, pageable: true, height: 550, toolbar: ["create"], columns: [ { field: "ShortCode", title: "Price Code", editor: shortcodeDropDownEditor, template: "#=ShortCode.ShortCode#" }, { field: "Description", title: "Description", editable: "false" }, { field: "Quantity", title: "Quantity" }, { command: ["edit", "destroy"], width: "150px" }], editable: true, save: function (e) { if (e.values.ShortCode !== "") { var test = e.model.set("Description", e.values.ShortCode.Description); } } }); $("#warehouse").kendoDropDownList({ dataTextField: "Name", dataValueField: "WarehouseID", dataSource: { valueTemplate: "#= Name#", template: '#= Name# <h3>#= Address1#, #= City #, #= Province#, #= Country#</h3>', transport: { read: { url: "http://localhost:53786/api/warehouse", dataType: "json" } }, schema: { model: { fields: { WarehouseID: { type: "number" }, Name: { type: "string" }, Address1: { type: "string" }, City: { type: "string" }, Province: { type: "string" }, Country: { type: "string" } } } } } }); }); function shortcodeDropDownEditor(container, options) { $('<input required data-text-field="ShortCode" data-value-field="PriceCodeID" data-bind="value:' + options.field + '"/>') .appendTo(container) .kendoDropDownList({ valuePrimitive: false, dataTextField: "ShortCode", dataSource: { transport: { read: { url: "http://localhost:53786/api/pricecodes/unique", dataType: "json" } } } }); } </script>In addition, I'd like to make it such that the user cannot edit the Description field manually; it can only be altered by changing the Price Code.

Hi,
I have created a kendoWindow with this code
function CustomerPopupEditor() {
$("#showCustomerEdit").append("<div id='window'></div>");
var myWindow = $("#window").kendoWindow({
width: "80%",
height: "47%",
title: "Customer",
content: "/Customer/CustomerEditor",
modal: true,
actions: [
"Close"
],
close: function (e) {
$("#window").empty();
}
}).data("kendoWindow");
myWindow.center().open();
}
and I am closing the window using this code
function CloseTheWindow() {
$("#window").data("kendoWindow").close();
}
this is called on a button click event, when I get this window open, it works fine, I click my Save button it closes it. However if I open it again and try to close it, the window won't close.
I am not sure if this is enough information or if I need to add more information.
Thanks
Hi Guys,
I'm trying to locate the unminified kendo culture JS files to modify for a custom culture in my application but for some reason i cant seem to locate them anymore in latest Kendo installation 2016.2.504 UI for ASP.NET MVC Q2 2016.
Can you point me out to a location where to find the culture file source?
Cheers!
Hello
Can we customize the measure based on some other column values? eg: If I have measures like below,
measures: {
"ChainShare": { field: "ChainShare", aggregate: "sum" },
"DemandIndex":{field:"DemandIndex",aggregate: "sum"},
"GroupShare":{field:"GroupShare",aggregate: "sum"}
}
Then can we define DemanIndex field as ChainShare/GroupShare .
Thanks and Regards
Satabdi
I have an issue where the initial popup is opened above the drop down list and when you filter and the list becomes small enough it drops below the anchor.
Problem is when the drop down is on the bottom of a scrollable page the drop down is obscured and the user can't select the value because the drop down is off screen and when scrolling it closes automatically.
Is there anyway to make the position of the popup sticky?
thanks
Justin.

I'm trying to setup auto-completion on a single column in my grid. This is being implemented in a backbone+marionette app. I'm following this example for the implementation http://jsfiddle.net/OnaiBai/Naka3/18.
The view is instantiated in my controller. Nothing happens when I enter text into the input box. Also there aren't any JS errors.
I can include more of the code if necessary. Any ideas on how I can get the auto-completion to work.
Template App.Templates.Search.SearchBoxStuff :
<label class="search-label" for="searchBox">Search Grid:</label><input type="search" id="searchBox" class="k-textbox text-input">
View:
App.SearchStuff.GridView = App.Common.Widgets.Grid.extend({ /** * Constructor */ constructor: function (options) { App.Common.Widgets.Grid.call(this, _.extend({ toolbar: [ { template: App.Templates.Search.SearchBoxStuff } ], dataSource: { type: 'odata', pageSize: 100, serverFiltering: true, serverPaging: true, serverSorting: true, sort: { field: 'name', dir: 'asc' }, schema: { model: { fields: { id: {type: 'number'}, name: {type: 'string'} } } }, transport: { read: { url: '/api/package/search/v1', dataType: 'json', type: 'POST', contentType: 'application/json' }, parameterMap: _.bind(this._parameterMap, this) } }, height: 700, scrollable: { virtual: true }, selectable: 'row', sortable: true, pageable: false, columns: [{ field: 'name', title: 'Name' } }, options));$('.text-input').kendoAutoComplete({ dataTextField: 'name', dataVextField: 'name', dataSource: this.dataSource }); },I have currently added the following custom validation to my interest name, but interest name has to be unique, so when user add new and existing interest name is already there, it will throw error. However, when user try to edit the record, it should be able to detect whether current interest name is changed, if it is a new interset name then only check only uniqueness validation, otherwise, it should allow the update to go through successfully.
With the following validation, when i try to perform update, it also throw the validation error, and i am do not know how to make this validation valid for Add New all the time, and valid for Update only when interest name is changed.
(function ($, kendo) {
$.extend(true, kendo.ui.validator, {
rules: { // custom rules
InterestNamevalidation: function (input, params) {
if (input.is("[name='InterestName']") && input.val() != "") {
var dataSource = $("#Customer").data("kendoGrid").dataSource;
var data = dataSource.data();
for (var i = 1; i < data.length; i++) {
if ($.trim(input.val().toLowerCase()) == $.trim(data[i].InterestName.toLowerCase())) {
input.attr("data-InterestNamevalidation-msg", "InterestName should be unique");
return false;
}
}
}
return true;
}
}
});
})(jQuery, kendo);