Hi,
need some help, this code works fine* with Chrome and Firefox, but i doesn't work with ie9.
e.errorThrown = No Transport
e.xhr.responseText = undefined.
* I can add and update items but i can't remove them.
Here is the code.
Any idea?
Thanks.
need some help, this code works fine* with Chrome and Firefox, but i doesn't work with ie9.
e.errorThrown = No Transport
e.xhr.responseText = undefined.
* I can add and update items but i can't remove them.
Here is the code.
<div id=
"grid"
></div>
$(document).ready(
function
() {
var
crudServiceBaseUrl =
"http://localhost:11028/IntexService.svc/Zonas"
,
crudServiceOptions =
""
,
dataSource =
new
kendo.data.DataSource({
type:
"odata"
,
transport: {
read: {
url: crudServiceBaseUrl + crudServiceOptions,
dataType:
"json"
},
update: {
url:
function
(data) {
return
crudServiceBaseUrl +
"("
+ data.ZonaId +
"L)"
;
}
},
create: {
url: crudServiceBaseUrl
},
destroy: {
url:
function
(data) {
return
crudServiceBaseUrl +
"("
+ data.ZonaId +
"L)"
;
}
}
},
batch:
false
,
pageSize: 10,
serverPaging:
true
,
serverFiltering:
true
,
schema: {
model: {
id:
"ZonaId"
,
fields: {
ZonaId: { editable:
false
, nullable:
true
},
Nombre: { validation: { required:
true
} }
}
},
errors:
"Errors"
},
error:
function
(e) {
alert(
"La operación ha fallado: \n"
+ e.errorThrown +
": "
+ e.xhr.responseText);
this
.cancelChanges();
}
});
$(
"#grid"
).kendoGrid({
dataSource: dataSource,
filterable:
true
,
pageable:
true
,
height: 410,
toolbar: [
"create"
],
columns: [
{ field:
"Nombre"
, width:
"150px"
},
{ command: [
"edit"
,
"destroy"
], title:
" "
, width:
"110px"
}],
editable:
"popup"
});
});
Thanks.