I have a grid which contains an adres ticket, some adresses contain a special character like '
When I want to get the data from the item when I click an icon on the record, I don't get the correct data:
This is my javascript to load the grid (it is placed in a div)
function loadConnectionsGrid() {
connectionsGrid = $("#connectionsGrid").kendoGrid({
selectable: "row",
filterable: true,
pageable: {
refresh: true,
pageSizes: [10, 20, 50, 100],
buttonCount: 5
},
resizable: true,
columnMenu: true,
sortable: true,
reorderable: true,
columns: [{
field: "EAN",
title: "EAN",
width: "140px"
}, {
field: "Discipline",
title: "Discipline",
filterable: { multi: true },
width: '100px'
}, {
field: "StreetName",
title: "Straat"
}, {
field: "PostalCode",
title: "Postcode",
width: '100px'
}, {
field: "BuildingNumber",
title: "Huisnummer",
width: '100px'
}, {
field: "BuildingNumberSuffix",
title: "Toevoeging",
width: '100px'
}, {
encoded: true,
field: "CityName",
title: "Plaats",
width: "140px"
}, {
title: " ",
template: "#=selectAddressAction(data)#",
width: '25px'
}]
}).data("kendoGrid");
}
In my case it's about column Cityname (I already tries encoded: true as you can see)
When I click the icon on the record this function fires:
function initializeCreateConnectionModal(e) {
$("#btn-create-and-assign").show();
$("#btn-create-case").show();
$("#createConnectionModal-success").hide();
$("#createConnectionModal-error").hide();
enexis.services.tablerecords.getData({ Tables: [{ Name: "ANL001" }] }, getAanleidingCallback);
var item = $(e.relatedTarget).data('item');
loadSelectedConnectionsGridData(item);
}
When I'm trying to get the item (the bold line) In this case I don't get an object with the data like Screenshot01.png
But I get a string (Screenshot02.png)