or
$(document).ready(function () {
var ds = null;
ds = new kendo.data.DataSource({
transport: {
read: {
url: "data.json", dataType: "json"
}
},
change: function () {
var data = this.data(); // or this.view();
}
});
$("#grid").kendoGrid({
dataSource: ds,
// dataSource: {
// data: ds,
// pageSize: 2
// },
sortable: {
mode: "single",
allowUnsort: false
},
columns: [
{
field: "Product",
title: "Product Title"
},
{
field: "Manufacturer",
title: "Manufacturer Title"
},
{
field: "Description",
title: "Description Title"
},
{
field: "Property2",
title: "Property 2"
}
]
});
});
<
script
id
=
"template"
type
=
'text/x-kendo-template'
>
#=Amount#
</
script
>
<
div
id
=
"calledAndDefeasedDebt"
data-role
=
"grid"
data-scrollable
=
"false"
data-bind
=
"source: calledAndDefeasedDebt"
data-columns
=
"['Description', {'field':'Amount', 'title':'AMT', 'template':'kendo.template($(\'template\').html())'}]"
>
</
div
>
kendoGrid({
dataSource : {
transport : {
create : {
url :
"http://testsite/rest/receipts.xml"
,
dataType :
"xml"
,
type :
"POST"
,
contentType :
"text/xml"
,
processData :
false
,
batch :
false
},
parameterMap :
function
(data, type) {
if
(type ===
"create"
) {
var
postxml =
'<reciept><id></id><tenant>'
;
postxml += data.tenant;
postxml +=
'</tenant>'
;
return
postxml;
}
}
}
var
tooltip = $(
"#Button_Settings_ID"
).kendoTooltip({
filter:
"input"
,
width: 210,
height: heigth,
position:
"bottom"
,
autoHide:
false
,
showOn:
"click"
,
callout:
true
,
content: kendo.template($(
"#Button_Settings_template"
).html())
}).data(
"kendoTooltip"
);
<
head
>
<
title
></
title
>
<
link
href
=
"Content/kendo/2013.1.319/kendo.default.min.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"Content/kendo/2013.1.319/kendo.common.min.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
script
src
=
"Script/jquery-1.8.3.min.js"
type
=
"text/javascript"
></
script
>
<
script
src
=
"Script/kendo/2013.1.319/kendo.all.min.js"
type
=
"text/javascript"
></
script
>
</
head
>
<
body
>
<
div
id
=
"example"
class
=
"k-content"
>
<
div
class
=
"demo-section"
>
<
div
id
=
"agglomerations"
>
<
a
href
=
"#"
title
=
"Canton - 26,300,000"
id
=
"canton"
></
a
>
<
a
href
=
"#"
title
=
"Jakarta - 25,800,000"
id
=
"jakarta"
></
a
>
<
a
href
=
"#"
title
=
"Mexico City - 23,500,000"
id
=
"mexico"
></
a
>
<
a
href
=
"#"
title
=
"Delhi - 23,500,000"
id
=
"delhi"
></
a
>
<
a
href
=
"#"
title
=
"Karachi - 22,100,000"
id
=
"karachi"
></
a
>
<
a
href
=
"#"
title
=
"New York - 21,500,000"
id
=
"newyork"
></
a
>
<
a
href
=
"#"
title
=
"Sao Paulo - 21,300,000"
id
=
"saopaolo"
></
a
>
<
a
href
=
"#"
title
=
"Mumbay/Bombay - 21,100,000"
id
=
"bombay"
></
a
>
<
a
href
=
"#"
title
=
"Los Angeles - 17,100,000"
id
=
"losangeles"
></
a
>
<
a
href
=
"#"
title
=
"Osaka - 16,800,000"
id
=
"osaka"
></
a
>
<
a
href
=
"#"
title
=
"Moscow - 16,200,000"
id
=
"moscow"
></
a
>
</
div
>
</
div
>
<
script
>
$(document).ready(function () {
var tooltip = $("#agglomerations").kendoTooltip({
filter: "a",
width: 120,
position: "top"
}).data("kendoTooltip");
tooltip.show($("#canton"));
$("#agglomerations").find("a").click(false);
});
</
script
>
<
style
scoped
=
"scoped"
>
.demo-section {
width: 692px;
}
#agglomerations {
position: relative;
width: 692px;
height: 480px;
margin: 0 auto;
background: url('../../content/web/tooltip/world-map.jpg') no-repeat 0 0;
}
#agglomerations a {
position: absolute;
display: block;
width: 12px;
height: 12px;
background-color: #fff600;
-moz-border-radius: 30px;
-webkit-border-radius: 30px;
border-radius: 30px;
border: 0;
-moz-box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
-webkit-box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
box-shadow: 0 0 0 1px rgba(0,0,0,0.5);
-moz-transition: -moz-box-shadow .3s;
-webkit-transition: -webkit-box-shadow .3s;
transition: box-shadow .3s;
}
#agglomerations a:hover {
-moz-box-shadow: 0 0 0 15px rgba(0,0,0,0.5);
-webkit-box-shadow: 0 0 0 15px rgba(0,0,0,0.5);
box-shadow: 0 0 0 15px rgba(0,0,0,0.5);
-moz-transition: -moz-box-shadow .3s;
-webkit-transition: -webkit-box-shadow .3s;
transition: box-shadow .3s;
}
#canton { top: 226px; left: 501px; }
#jakarta { top: 266px; left: 494px; }
#mexico { top: 227px; left: 182px; }
#delhi { top: 214px; left: 448px; }
#karachi { top: 222px; left: 431px; }
#newyork { top: 188px; left: 214px; }
#saopaolo { top: 304px; left: 248px; }
#bombay { top: 233px; left: 438px; }
#losangeles { top: 202px; left: 148px; }
#osaka { top: 201px; left: 535px; }
#moscow { top: 153px; left: 402px; }
#canton:hover,
#jakarta:hover,
#mexico:hover,
#delhi:hover,
#karachi:hover,
#newyork:hover,
#saopaolo:hover,
#bombay:hover,
#losangeles:hover,
#osaka:hover,
#moscow:hover { z-index: 10; }
</
style
>
</
div
>
</
body
>
</
html
>
var
dsBuecherAT =
new
kendo.data.DataSource(
{
transport: {
read: {
url:
"/api/t_buechers"
,
dataType:
"json"
}
}
});
$(
"#buecherAT"
).kendoTabStrip({
dataTextField:
"Buch"
,
dataContentField:
"Buch_ID"
,
dataSource: dsBuecherAT
});
var
dataSource =
new
kendo.data.DataSource({
data: [
{ name:
"Jane Doe"
},
{ name:
"John Doe"
}
],
filter: { field:
"name"
, operator:
"startswith"
, value:
"Jane"
}
});
var
dataSource =
new
kendo.data.DataSource({
data: [
{ name:
"Jane Doe"
},
{ name:
"John Doe"
}
],
filter: {
"field"
:
"name"
,
"operator:"
"startswith"
,
"value:"
"Jane"
}
});
//we are getting the kapitels
function
getKapitels(buch_ID) {
alert(buch_ID);
var
dsKapitels =
new
kendo.data.DataSource({
transport: {
read: {
url:
"/api/t_kapitels"
,
dataType:
"json"
}
}
});
$(
"#kapitel"
).kendoTabStrip({
dataTextField:
"Kapitel_ID"
,
dataContentField:
"Buch_ID"
,
dataSource: dsKapitels.filter({ field:
"Buch_ID"
, operator:
"eq"
, value:
"1"
})
})
}
//we are getting the kapitels
function
getKapitels(buch_ID) {
alert(buch_ID);
var
dsKapitels =
new
kendo.data.DataSource({
transport: {
read: {
url:
"/api/t_kapitels"
,
dataType:
"json"
}
},
filter: { field:
"Buch_ID"
, operator:
"eq"
, value:
"1"
}
});
$(
"#kapitel"
).kendoTabStrip({
dataTextField:
"Kapitel_ID"
,
dataContentField:
"Buch_ID"
,
dataSource: dsKapitels
})
}