My kendo grid not refreshing after a edit or create a new row.I have called a angularJs service for CRUD operation. Here's the controller
My kendo grid not refreshing after a edit or create a new row.I have called a angularJs service for CRUD operation.
Here's the controller
app.controller("roadInventoryCtrl", function ($scope, services) {
$scope.gridOptions = {
columns: [
{
field: "RoadCode",
title: "Road Code",
width: "",
attributes: { class: "ob-right" }
},
{
field: "RoadTypeId",
title: "Type",
readonly: true,
width: "",
attributes: { class: "ob-right" }
},
{
field: "SerialNo",
title: "Serial",
width: "",
attributes: { class: "ob-right" }
},
{
field: "Name",
width: "38%"
},
{
field: "Length",
filterable: false,
attributes: { class: "ob-right" }
},
{
field: "CrestWidth",
title: "Crest width",
filterable: false,
attributes: { class: "ob-right" }
},
{
field: "EmbkHeight",
title: "Embk height",
filterable: false,
attributes: { class: "ob-right" }
},
{
field: "Remarks",
filterable: false
},
{
command: [
{
name: "edit",
template: "<a data-toggle='tooltip' data-placement='left' title='edit' class='k-grid-edit k-grid-update red-tooltip' style='width: 26px; height: 26px; vertical-align: middle; text-align: center; cursor:pointer'><span style='margin: 4px;' class='glyphicon glyphicon-edit'></span></a>",
text: " "
},
{
name: "destroy",
template: "<a if-role-permission=\"['PERMISSION_WORKFLOW_DEFINITION_DELETE']\" class='k-grid-delete' style='width: 26px; height: 26px; vertical-align: middle; text-align: center; cursor:pointer' ><span style='margin: 4px;' class='glyphicon glyphicon-remove-circle target' title='delete'></span></a>",
text: " "
}, {
name: "map",
template: "<a class='k-grid-delete' style='width: 26px; height: 26px; vertical-align: middle; text-align: center; cursor:pointer' ><span style='margin: 4px;' class='glyphicon glyphicon-map-marker target' title='map' ></span></a>",
text: " "
}, {
name: "info",
template: "<a class='k-grid-delete' style='width: 26px; height: 26px; vertical-align: middle; text-align: center; cursor:pointer' ><span style='margin: 4px;' class='glyphicon glyphicon-info-sign target' title='info' ></span></a>",
text: " "
}, {
name: "pic",
template: "<a class='k-grid-delete' style='width: 26px; height: 26px; vertical-align: middle; text-align: center; cursor:pointer' ><span style='margin: 4px;' class='glyphicon glyphicon-picture target' title='picture'></span></a>",
text: " "
}
],
title: "",
width: "11%"
}
],
//editable: true,
editable: 'inline',
toolbar: ["create"],
pageable: true,
dataSource: {
pageSize: 25,
transport: {
read: function(e) {
services.getRoadInventroy()
.then(function success(response) {
e.success(response.data);
}, function error(response) {
alert('something went wrong');
console.log(response);
});
},
update: function(e) {
services.updateRoadInventory(e)
.then(function success(response) {
e.success(response.data);
}, function error(response) {
console.log(response);
});
},
destroy: function(e) {
services.destroyRoadInventory()
.then(function success(response) {
e.success(response.data);
}, function error(response) {
console.log(response);
}
);
},
create: function(e) {
services.createRoadInventory(e)
.then(function success(response) {
console.log(response);
},function error(response) {
console.log(response);
}
);
}
},
schema: {
model: {
id: "RoadCode",
fields: {
RoadCode: {
editable: false
}
}
}
}
},
sortable: true,
serverPaging: true,
serverSorting: true,
scrollable: true,
dataBound: function () {
this.expandRow(this.tbody.find("tr.k-master-row").first());
},
selectable: "row",
filterable: {
extra: false,
operators: {
string: {
startswith: "Starts with",
contains:"Contains"
},
number: {
}
}
}
}
});
How can i solve this.

Hello,
We are trying to replicate this style of chart: https://www.amcharts.com/demos/stacked-bar-chart-with-negative-values/
Is it possible to accomplish this with Kendo UI?
We don't need two bars on the same line, but we would have a bar that extends into either a postive or negative x-axis with a 0 starting point. The positive/negative would represent a series (such as male/female) in the above example. We would also want to show the labels of the Value axis on the outside end of the bar, and the value label on the inside end (such as showing the "age" category label next to the bar, with the value inside the bar with above example).
Thanks.
Hello,
I have a strange behavior of the scheduler widget. It doesn't display correctly ( see pic attached).
It used to work before. I've checked all the css and js reference. Everything seems ok. I don't know where to look.
Anybody have a clue?

<!DOCTYPE html><html><head> <style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style> <title></title> <link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.1.112/styles/kendo.common-material.min.css" /> <link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.1.112/styles/kendo.material.min.css" /> <script src="//kendo.cdn.telerik.com/2016.1.112/js/jquery.min.js"></script> <script src="//kendo.cdn.telerik.com/2016.1.112/js/kendo.all.min.js"></script></head><body> <script src="../content/shared/js/people.js"></script> <div id="example"> <div id="grid"></div> <script> $(document).ready(function() { $("#grid").kendoGrid({ dataSource: { data: createRandomData(50), group: [{ field: "FirstName" }], pageSize: 5, schema: { model: { id: "Id", fields: { FirstName: { type: "string" }, LastName: { type: "string" }, City: { type: "string" }, Age: { type: "number" }, BirthDate: { type: "date" } } } } }, selectable: "multiple cell", navigatable: true, filterable: true, sortable: true, pageable: true, scrollable: { virtual: true }, columns: [ { field: "FirstName", width: 120, title: "First Name" } , { field: "LastName", width: 120, title: "Last Name" } , { width: 120, field: "City" } , { field: "BirthDate", title: "Birth Date", template: '#= kendo.toString(BirthDate,"dd MMMM yyyy") #' } , { width: 80, field: "Age" } ] }); $(document.body).keydown(function(e) { if (e.altKey && e.keyCode == 87) { $("#grid").data("kendoGrid").table.focus(); } }); }); </script> <div class="box wide"> <div class="box-col"> <h4>Focus</h4> <ul class="keyboard-legend" style="margin-bottom: 1em;"> <li> <span class="button-preview"> <span class="key-button leftAlign">Alt</span> + <span class="key-button">w</span> </span> <span class="button-descr"> focuses the widget </span> </li> </ul> <h4>Actions applied on Grid header</h4> <ul class="keyboard-legend"> <li> <span class="button-preview"> <span class="key-button">Enter</span> </span> <span class="button-descr"> sort by the column </span> </li> <li> <span class="button-preview"> <span class="key-button leftAlign">Alt</span> + <span class="key-button">Down</span> </span> <span class="button-descr"> opens the filter menu </span> </li> <li> <span class="button-preview"> <span class="key-button">Esc</span> </span> <span class="button-descr"> closes the filter menu </span> </li> <li> <span class="button-preview"> <span class="key-button">Tab</span> </span> <span class="button-descr"> navigates through the elements in the filter menu(default browser behavior) </span> </li> <li> <span class="button-preview"> <span class="key-button leftAlign">Shift</span> + <span class="key-button">Tab</span> </span> <span class="button-descr"> same as Tab, but in reverse order </span> </li> </ul> </div> <div class="box-col"> <h4>Actions applied on Grid data table</h4> <ul class="keyboard-legend"> <li> <span class="button-preview"> <span class="key-button wider">Arrow Keys</span> </span> <span class="button-descr"> to navigate over the cells </span> </li> <li> <span class="button-preview"> <span class="key-button">Enter</span> </span> <span class="button-descr"> on group row will toggle expand/collapse </span> </li> <li> <span class="button-preview"> <span class="key-button wider">Page Up</span> </span> <span class="button-descr"> pages on previouse page </span> </li> <li> <span class="button-preview"> <span class="key-button wider">Page Down</span> </span> <span class="button-descr"> pages on next page </span> </li> <li> <span class="button-preview"> <span class="key-button">Space</span> </span> <span class="button-descr"> selects currently highlighted cell </span> </li> <li> <span class="button-preview"> <span class="key-button leftAlign">Ctrl</span> + <span class="key-button">Space</span> </span> <span class="button-descr"> same as Space, but perists previously selected cells(only for selection mode "multiple") </span> </li> </ul> </div> </div> </div></body></html>I have a Kendo grid with inline editing. When I edit a row, and then click update, the changes show, but then when I edit the same row again and then click cancel, all the changes are removed, including the first edit. How can I make the data save after each 'Update'?
Also can someone explain the difference between update:{} and save:{}? Thanks.
I have a Kendo UI map working great in Chrome, Firefox, and Safari, but not Internet Explorer 11. There are 3 layers being loaded: a "tile" layer from opencyclemap for the background images, a "shape" layer via geoJSON file of the world countries, and a "marker" layer. The strange thing is that the "tile" layer and the "marker" layer load fine, but the geoJSON "shape" layer never loads, and the "shapeCreated" event never fires. This event fires fine on other browsers. Is there something I can look for in order to debug what I've messed up on in the Kendo UI framework? I just tested the example maps you have in the same IE browsers and the geoJSON maps work fine, so I'm thinking it's something that I'm doing wrong with the loaded data?
This is the same file/map as a previous post but a different problem.
001.var colors = ['#9ecae1', '#6baed6', '#4292c6', '#2171b5', '#08519c', '#08306b'];002. 003.// create the map with the markers004.$("#kendoMapCounty").kendoMap({005. center: [38.891033, -95.437500],//[30.268107, -155.744821],006. zoom: 4,007. controls: {008. attribution: false,009. navigator: false010. },011. wraparound: false,012. layers: [013. {014. type: "tile",015. urlTemplate: "http://#= subdomain #.tile2.opencyclemap.org/transport/#= zoom #/#= x #/#= y #.png",016. subdomains: ["a", "b", "c"],017. attribution: "© <a href='http://osm.org/copyright'>OpenStreetMap contributors</a>." +018. "Tiles courtesy of <a href='http://www.opencyclemap.org/'>Andy Allan</a>"019. },020. {021. type: "shape",022. dataSource: {023. type: "geojson",024. transport: {025. read: "/Resources/kendoui/GeoJSON/countries_and_counties.geo.json"026. }027. }028. },029. {030. type: "marker",031. dataSource: SL.kendoMapMarkers,032. locationField: "latlng",033. titleField: "name"034. },035. ],036. shapeCreated: function (e) {037. var dataItem = e.shape.dataItem;038. var id = dataItem.properties.GEOID10;039. if (typeof id !== "undefined") {040. SL.shapesById[id] = SL.shapesById[id] || [];041. SL.shapesById[id].push(e.shape);042. 043. var STATEFP10 = parseInt(e.shape.dataItem.properties["STATEFP10"]);044. if (STATEFP10) {045. e.shape.fill(colors[STATEFP10 % colors.length]);046. e.shape.options.set("fill.opacity", 0.0);047. }048. 049. if (SL.selectedLocationIDs.length > 0) {050. $.each(SL.selectedLocationIDs, function (key, mapId) {051. if (mapId === id.toString()) {052. e.shape.options.set("fill.opacity", 0.8);053. SL.selectedCounties.push(e.shape);054. }055. });056. }057. }058. 059. id = dataItem.properties.iso_a3;060. if (typeof id !== "undefined") {061. var diss_me_id = dataItem.properties.diss_me;062. SL.shapesById[id] = SL.shapesById[id] || [];063. SL.shapesById[id].push(e.shape);064. 065. var typeCode = e.shape.dataItem.properties["type"];066. if (typeCode === 'State') {067. var diss_me = parseInt(e.shape.dataItem.properties["diss_me"]);068. if (diss_me) {069. e.shape.fill(colors[diss_me % colors.length]);070. e.shape.options.set("fill.opacity", 0.0);071. }072. }073. else {074. var iso_n3 = parseInt(e.shape.dataItem.properties["iso_n3"]);075. if (iso_n3) {076. e.shape.fill(colors[iso_n3 % colors.length]);077. e.shape.options.set("fill.opacity", 0.0);078. }079. }080. 081. if (SL.selectedLocationIDs.length > 0) {082. $.each(SL.selectedLocationIDs, function (key, mapId) {083. if (typeCode === 'State') {084. if (mapId === diss_me_id.toString()) {085. e.shape.options.set("fill.opacity", 0.8);086. SL.selectedCounties.push(e.shape);087. }088. }089. else {090. //var DBCode = SL.getDBCodeFromMapId(mapId);091. if (mapId === id) {092. e.shape.options.set("fill.opacity", 0.8);093. SL.selectedCounties.push(e.shape);094. }095. }096. });097. }098. }099. },100. click: SL.onClick,101. reset: SL.onReset,102. pan: SL.onPan,103. panEnd: SL.onPanEnd,104. shapeClick: SL.onShapeClick,105. shapeMouseEnter: SL.onShapeMouseEnter,106. shapeMouseLeave: SL.onShapeMouseLeave,107. zoomStart: SL.onZoomStart,108. zoomEnd: SL.onZoomEnd109.});Having issues recreating the demo example of importing a spreadsheet. The demo references a saveUrl and I cannot determine what that is used for.
In addition, I tried the Dojo example of the fromFile method and could not get it to work. When I select a file, nothing happens. Is the change event not getting fired?
I am using Chrome as my browser. Any help would be appreciated. Basically trying to load a simple Excel file into the spreadsheet widget.
Thanks, Rick
Hi,
Please help me to get my templates which I load in MVVM in different tabs fine, until I load tabs and their respective content divs dynamically using tabStrip.
I should be able to load separate templates with in tabs but I am not sure how to go about it pulling from remote JSON.
Please have a look at the link below. I've tried to add my data as arrays in the project they are all remote JSON files.
I would appropriate if you could show me in the example how can I load different templates with different datasource in different tabs. In the example I am using tabsDataSource and tileDataSource.
Thanks.
Savas
