or
01.
var
dataSource =
new
kendo.data.DataSource({
02.
transport: {
03.
read: {
05.
contentType:
"application/json; charset=utf-8"
,
06.
dataType:
"jsonp"
,
// "jsonp" is required for cross-domain requests; use "json" for same-domain requests
07.
}
08.
},
09.
schema: {
10.
data:
function
(response) {
11.
return
response.posts;
// twitter's response is { "results": [ /* results */ ] }
12.
}}
13.
});
14.
dataSource.fetch(
function
(){
15.
var
data =
this
.data();
16.
console.log(data.length);
17.
console.log(data[0].title);
18.
dataSource.sync();
19.
});
// Prevent the grid command 'click' event from triggerring the grids 'change' event.
grid.tbody.on(
'mousedown'
,
'a'
,
function
(evnt) {
evnt.stopImmediatePropagation();
});
<
form
action
=
"demo_form.asp"
>
<
ul
data-role
=
"listview"
id
=
"testListView"
>
<
li
>
Text: <
input
class
=
"required"
>
</
li
>
<
li
>
Date (class): <
input
type
=
"date"
class
=
"required"
>
</
li
>
<
li
>
Date (style): <
input
type
=
"date"
style
=
"background:yellow"
>
</
li
>
<
li
>
<
input
type
=
"submit"
>
</
li
>
</
ul
>
</
form
>
</
div
>
<
style
scoped>
.required
{
background:yellow
}
</
style
>