Hi, I have a filter on the left side of my web and a grid with the result on the left side. By default that grid is empty, but when I submit the filter form the result should be shown in this grid. I am using kendo spa and mvvm so my observable (model) is something like this:
where getAgentOnlyFound get the data in json format from the server, so...
and my html:
the real example is pretty much large but I just put here the important part. My problem is: this example works in random way. Sometime it works and sometime doesn't and I do not receive any javascript errors from my browser.
Any idea ??
Thanks in advance...
var vm = kendo.observable({ getAgentOnlyFound: function(){....},});where getAgentOnlyFound get the data in json format from the server, so...
var dataSourceOnlyFound = new kendo.data.DataSource({
transport: {
read: function(options) {
options.success(vm.getAgentOnlyFound());
},
},
schema: {
parse: function (data) {
$.each(data, function (i, val) {
val.EffectiveDate = kendo.toString(new Date(parseInt(val.EffectiveDate.substr(6))), "MMM/dd/yyyy");
});
return data;
},
model: {
id: "Id"
}
}
});
$("#agent-list-grid").data("kendoGrid").setDataSource(dataSourceOnlyFound);
and my html:
<div id="agent-list-grid" data-role="grid" data-editable="false" data-columns="[ { 'field': 'FullName', title: 'Agent Name', 'width': 270 }, { 'field': 'Country.Name', title: 'Country' }, { 'field': 'EffectiveDate', title: 'Effective Date' }]" data-bind="visible: isListView">the real example is pretty much large but I just put here the important part. My problem is: this example works in random way. Sometime it works and sometime doesn't and I do not receive any javascript errors from my browser.
Any idea ??
Thanks in advance...