or
$(
'#file'
).kendoUpload({
async: { ... },
select:
function
(e) {
// Do things in here
}
});
01.
var
datasource =
new
k.data.DataSource({
02.
transport: {
03.
read: {
05.
url:
'test.txt'
,
06.
dataType:
'json'
07.
}
08.
},
09.
schema: {
10.
data:
function
(data) {
11.
return
data.Layers || [];
12.
}
13.
}
14.
});
15.
16.
//polling..
17.
var
_interval = window.setInterval(
function
() {
18.
datasource.read();
19.
}, 5000);
20.
21.
datasource.bind(
'change'
,
function
(e) {
22.
//This shouldn't be triggered every 5 seconds
23.
console.log(
this
.data().length);
24.
});
HTTP/1.1 304 Not Modified
Last-Modified: Mon, 02 Sep 2013 08:02:11 GMT
Expires: Mon, 02 Sep 2013 08:15:00 GMT
Accept-Ranges: bytes
ETag: "383bbbab2a7ce1:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Mon, 02 Sep 2013 09:23:10 GMT