or
<
link
href
=
"http://cdn.kendostatic.com/2012.1.322/styles/kendo.mobile.ios.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css"
rel
=
"stylesheet"
/>
<
link
href
=
"http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css"
rel
=
"stylesheet"
/>
top
:
50%
;
right
:
0.8em
;
line-height
:
normal
;
margin-top
:
-0.5em
;
position
:
absolute
;
z-index
:
1
;
}
.km-root input:not([type=button]):not([type=submit]):not([type=reset]):not([type=image]):not([type=checkbox]):not([type=radio]) {
right
:
0px
;
margin-top
:
-0.95em
;
}
.km-ios input:not([type=button]):not([type=submit]):not([type=reset]):not([type=image]):not([type=checkbox]):not([type=radio]) {
padding
:
0.4em
;
outline
:
0px
;
border
:
0px
currentColor;
color
:
rgb
(
56
,
84
,
135
);
font-size
:
1.1
rem;
min-width
:
6em
;
}
$(document).ready(
function
() {
$(
"#grid"
).kendoGrid({
dataSource:
new
kendo.data.DataSource({
transport: {
read: {
url:
"WebService.asmx/HelloWorld"
, //had also tried absolute path
datatype: xml
}
},
schema: {
type:
"xml"
,
data:
"/NewDataSet/Group"
,
model: {
fields: {
rowid:
"rowid/text()"
,
group_id:
"group_id/text()"
,
group_name:
"group_name/text()"
,
}
}
}
}),
scrollable:
false
,
sortable:
true
});
});
I'm working on a page that needs to have a rowTemplate added to a kendo grid. I've tried a few permiatations and can not get it to work. I have the grid bound to a view model with a data source property called Info. I pasted my code below and am not sure what I am missing.
<table id="grid" width="100%" data-role="grid" data-bind="source: Info" data-template="row-template"
data-columns='[{"field": "ID","title": "Id"}]'>
<tbody ><tr><td></td></tr></tbody>
</table>
<script id="row-template" type="text/x-kendo-template">
<tr>
<td>
<a href="Page.aspx?ID=${ ID }">Edit</a>
</td>
</tr>
</script>
new
kendo.data.DataSource({
transport: {
read: {
url:
"webservices/entities/read"
,
dataType:
"jsonp"
,
jsonp:
false
,
jsonpCallback:
"callback"
},
create: {
url:
"webservices/entities/create"
,
type:
"post"
,
},
},
schema: {
data:
"items"
,
total:
"total"
,
model: {
id:
"id"
,
fields: {
id: {type:
"number"
},
name: {type:
"string"
},
description: {type:
"string"
},
parent_id: {type:
"number"
}
}
},
serverFiltering:
true
,
sort: {field:
"name"
, dir:
"asc"
},
filter: {field:
"parent_id"
, operator:
"eq"
, value: parent_id}
});