Hi,
I am using treelist under the following scenario:
1) i have a local dataset
2) While displaying I use column templating
3) while editing, I create multiple kendo numeric textboxes and appendTo container (code to follow)
4) I am using Angular
My problem is that the update method never gets called after i submit and edit to my numeric text box within the treelist cell. I.e after hitting Edit --> Update button, the code in update function (Transport: Update called) never gets invoked...What am I doing wrong?
Also, whats the best way here to update the data and put it back into the grid as well as my datasource?
Note to Admins: Since I am using angular, from below code: please give me an angular compatible answer if possible...
Thanks a lot,
Labhesh
------------------------
Here's the code:
<div ng-controller="testcontroller as vm"> <div kendo-treelist="vm.treelist" k-options="vm.tlOptions"></div></div>
vm.tlOptions = { dataSource: { transport:{ read: function(e) { console.log("TRANSPORT: READ Called"); e.success(vm.dataToShow); }, update: function(e){ console.log("TRANSPORT: UPDATE Called"); var updatedItems = e.data; console.log(updatedItems); e.success(); } }, schema:{ model: { "id": "sId", "parentId":"sLink", "fields": schemaFlds } } }, editable:true, resizable:true, columns: cc};
NumericEditor attached to each editable column:
var numericEditor = function (container, options) { $('<input id="abc" style=color:red value='+options.model[options.field].vols.mdl + '"/>') .appendTo(container) .kendoNumericTextBox({ decimals: 2, format: "n2" }); $('<input id="abc" style=color:blue value='+options.model[options.field].vols.usr + '"/>') .appendTo(container) .kendoNumericTextBox({ decimals: 2, format: "n2" }); $('<label style=color:green>'+options.model[options.field].vols.actual+'</label>') .appendTo(container);};