UI Ref : http://demos.telerik.com/kendo-ui/grid/editing
Service Ref: https://github.com/telerik/kendo-ui-demos-service
Hi,
I have looked at this implementation for KendoUI batch editing but the service end doesn't work with Web API. As the type of controller used in Web API is different than one used in MVC controller. So, this: DeserializeObject<IEnumerable<ProductModel>>("models"); doesn't work in Web API. Do you have any solution for this. An urgent response would be appreciated.
Thx!
Hi,
I have a treeview and would like users to be able to add a new item to the treeview. When the new item is added I would like to have an AutoComplete field they can type the new node name into and use server-side filtering to retrieve the available values.
How can I do this?
Thanks in advance
Matt

When the user changes the spreadsheet, I use the onchange method to run certain validations. Is there any way to determine which key(s) the user has pressed? I'm interested in keys such as delete and backspace.
Thanks!
My cancel event in my scheduler is like so:
cancel: function(e){
console.log('Cancelling');
console.log(e);
console.log(e.event.ownerId[0].value);
console.log(e);
if(e.event.id != '0'){
e.sender.dataSource.sync();
//e.sender.dataSource.read();
}
},
The only way I was able to get the scheduler to work somewhat properly is by calling dataSource sync in the cancel method because before doing that, if you pressed cancel, the data structure of the event was altered and if you tried to re-open that event, it threw an error with my kendo multi-selects inside the edit/create window. However, by calling sync, the scheduler refreshes its data when you cancel and it all goes back to the way it should be.
My issue though... is that when I press cancel and it does its sync, it triggers the update method. So it basically has the same functionality as the save event because it goes through update and alters the data of the event if anything was changed and doesn't actually 'cancel'
I am wondering how I might prevent it from running update when cancel is pressed? And what determines if update CRUD operation is ran? Like I know that create gets triggered when the ID of the event is the default id specified in the schema, but not sure what determines if update should go or not. Is that the dirty bit of the event?

I am wondering how I might update the scheduler in the databinding event? When I try to call the dataSource read or just refresh the view, it goes into a continuous loop of datasource reading then scheduler databinding and nothing actually gets displayed in the scheduler.
My purpose for this is I am trying to filter events based on the start and end date of the current view because I am dealing with potentially thousands and thousands of events.
My databinding event for the scheduler is:
dataBinding: function(e){
console.log(e);
console.log(e.sender.view());
console.log(e.sender.view().startDate());
console.log(e.sender.view().endDate());
console.log(e.sender.dataSource.data());
if(e.action === 'rebind'){
console.log('Rebinding data to scheduler!');
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.CalendarData.getCurrentViewEvents}', e.sender.view().startDate(), e.sender.view().endDate(), '{!fieldSetMap}', function(result, event){
result = result.replace(/\"\;/g, '"');
result = result.replace(/\#39\;/g, '\'');
var resultArray = JSON.parse(result);
console.log(resultArray);
var correctedResults = getNewEvents(resultArray);
console.log(correctedResults);
eventData = correctedResults;
//e.sender.dataSource.data(eventData);
//scheduler.view(scheduler.view().name);
});
}
},
It gets tricky trying to update and refresh the eventData (which needs to go to the dataSource read operation because that is all my events) dealing with the remote action, which happens asynchronously, thus it would be ideal to refresh inside the remote action method callback in the dataBinding event function. But yeah, doing so as I have tried just gives me the never-ending loop of dataBinding/reading.
I am grabbing events from a database then storing them locally in eventData, I know there are remote data examples of server filtering based on the start and end date of the current view, but those do not help in my situation with local data.

I'm getting the following console error when trying to manually export a grid to Excel:
"Uncaught Error: This method has been removed in JSZip 3.0, please check the upgrade guide."
Code to trigger export:
function exportGrid() {
var grid = $("#coingrid").data("kendoGrid");
grid.saveAsExcel();
}
Should I revert to a 2.x version of JSZip, is there a work-around, or am I doing something wrong (most probable answer)? I'm using 2016.2 release of UI. Thanks.
Kendo UI Bower Issue:
Package;
https://bower.telerik.com/bower-kendo-ui.git#~2017.1.321
File;
kendo-ui\styles\kendo.common.min.css
Issue;
Invalid selector:
.k-i-tri-state-$1 $2---
This unfortunately breaks my entire project as it no longer builds :(.


I'm using the AngularJS configuration options to set up a basic gantt chart for tasks and dependencies (see below for configuration) along with a Web API 2 web service. If I don't include configuration for dependencies, all functionality around tasks behaves exactly as expected. However, including dependencies seems to be causing some odd behaviors. Attempting to delete a dependency triggers a "create" operation within the dependency datasource instead of a "destroy". Deleting a task will also trigger the dependency "create" operation, while a "destroy" operation is still triggered as expected for the task. If I try to create a new dependency between tasks it appears that a "create" operation will be invoked not just for the new dependency, but for all other existing dependencies within the datasource. Is this expected behavior and I'm just not understanding something, or is there a problem that I'm not seeing in my configuration?
The script version I'm using is v2017.1.118.
<div kendo-gantt k-options="vm.ganttOptions"></div>
var rootUrl = "/api/requestTasks";var datatype = "json";var contenttype = "application/json";var requestId = "1";$scope.ganttDs = new kendo.data.GanttDataSource({ batch: false, transport: { read: { url: rootUrl + "/" + requestId, dataType: datatype }, update: { url: rootUrl, dataType: datatype, type: "PUT", contentType: contenttype }, destroy: { url: rootUrl + "/delete", dataType: datatype, type: "POST", contentType: contenttype }, create: { url: rootUrl, dataType: datatype, type: "POST", contentType: contenttype }, parameterMap: (options, operation) => { if (operation !== "read") { return kendo.stringify(options); } } }, schema: { model: { id: "id", fields: { id: { from: "Id", type: "number" }, orderId: { from: "Order", type: "number", validation: { required: true } }, parentId: { from: "ParentId", type: "number", defaultValue: null, validation: { required: true } }, start: { from: "StartDate", type: "date" }, end: { from: "EndDate", type: "date" }, title: { from: "Title", defaultValue: "new task", type: "string" }, percentComplete: { from: "PercentComplete", type: "number" }, summary: { from: "Summary", type: "boolean" }, expanded: { from: "Expanded", type: "boolean" }, requestId: { from: "RequstId", type: "number" }
} } }});var depUrl = "api/requestTaskDependencies";$scope.ganttDependencyDs = new kendo.data.GanttDependencyDataSource({ transport: { read: { url: depUrl + "/" + requestId, dataType: datatype }, update: { url: depUrl, dataType: datatype, type: "PUT", contentType: contenttype }, create: { url: depUrl, dataType: datatype, type: "POST", contentType: contenttype }, destroy: { url: depUrl + "/delete", dataType: datatype, type: "POST", contentType: contenttype }, parameterMap: (options, operation) => { if (operation !== "read") { return kendo.stringify(options); } } }, schema: { model: { id: "id", fields: { predecessorId: {from: "PredecessorId", type: "number"}, successorId: {from: "SuccessorId", type: "number"}, type: {from: "Type", type: "number"} } } }});$scope.ganttOptions = { dataSource: ganttDs, dependencies: ganttDependencyDs, height: 500, views: [ {type: "day", selected: true}, "week", "month" ], columns: [ { field: "title", title: "Title", editable: true }, { field: "start", title: "Start Date", format: "{0:MM/dd/yyyy}", width: 100 }, { field: "end", title: "End Date", format: "{0:MM/dd/yyyy}", width: 100 } ]};