or
// use this to handle auto-increment for new rowsvar current = -1;function onChange(e) { if (e.action == "add") { var item = e.items[0]; item.ID = current; current -= 1; }}// ID = -1var item = dataSource.get(ID);// UID = undefined because the UID was generated thinking it was an ID of 0, not -1var uid = item.uid;
var myDS = new kendo.data.DataSource({ transport: { read: { url: 'dataset.json' ,dataType: "jsonp" ,data: { select: "ID,NAME" } } }, schema: { data: function(response) { return response.features; }, model: { fields: { "properties.ID": { type: "number" }, "properties.NAME": { type: "string" } }, } }});$("#dropdown").kendoComboBox({ placeholder: "...", autoBind: false, suggest: true, dataTextField: "properties.NAME", dataValueField: "properties.ID", dataSource: myDS});ID | NAME-------------1 | 0,42 | 63 | 104 | 205 | 356 | 1107 | 2208 | 400