or
$(document).ready(function () {
// Create Data Source
var individualDataSource = new kendo.data.DataSource({
transport: {
read: {
url: "/Individual/JsonDataList/",
dataType: "json"
}
},
serverFiltering: true,
schema: {
model: {
fields: {
Id: { type: "number" },
Display: { type: "string" }
}
}
}
});
// Create Combo Box
$('#Combo').kendoComboBox({ filter: "contains",
suggest: true,
placeholder: "Select Individual",
dataTextField: "Display",
dataValueField: "Id",
dataSource: individualDataSource
});
});
<
html
>
<
head
>
<
link
id
=
"favicon"
rel
=
"shortcut icon"
href
=
"http://localhost:52617/Content/favicon.ico"
/>
<
link
href
=
"http://localhost:52617/Content/style.css"
rel
=
"stylesheet"
type
=
"text/css"
media
=
"all"
/>
<
link
href
=
"http://localhost:52617/Content/print.css"
rel
=
"stylesheet"
type
=
"text/css"
media
=
"print"
/>
<
link
href
=
"http://localhost:52617/Content/redmond/jquery-ui-1.8.6.custom.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"http://localhost:52617/Content/kendo.common.min.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"http://localhost:52617/Content/kendo.default.min.css"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
script
type
=
"text/javascript"
src
=
"http://localhost:52617/Scripts/CombinedScripts.aspx"
></
script
>
<
script
type
=
"text/javascript"
src
=
"http://localhost:52617/Scripts/kendo.web.min.js"
></
script
>
<
script
type
=
"text/javascript"
src
=
"http://localhost:52617/Scripts/kendo.aspnetmvc.min.js"
></
script
>
</
head
>
<
body
>
<
div
id
=
"pageheader"
>
<
a
href
=
"http://localhost:52617/"
title
=
"My Page"
>
</
div
>
<
div
id
=
"menucontainer"
>
<
div
id
=
"MenuItems"
>
<
ul
class
=
"menu"
>
<
li
>Main Menu</
li
>
<
li
><
a
href
=
"http://localhost:52617/account/logon"
>Log On</
a
></
li
>
</
ul
>
</
div
>
</
div
>
<
div
id
=
"main"
>
<
h2
>Test</
h2
>
<
div
id
=
"comboDiv"
>
<
input
id
=
"Combo"
/>
</
div
>
</
div
>
</
body
>
</
html
>
The createGraph function does some work to create a settings object and then calls $el.kendoChart(settings);$('#graph1').empty(); createGraph('graph1', fullYear, -77);
...
seriesClick: onSeriesClick
function
onSeriesClick(e) {
var
currentDate =
new
Date(2012, 0, 1);
currentDate.setMonth(currentDate.getMonth() + e.category - 1);
...
seriesClick: onSeriesClick(e, contentItem),
function
onSeriesClick(e, contentItem) {
var
currentDate =
new
Date(2012, 0, 1);
currentDate.setMonth(currentDate.getMonth() + e.category - 1);
<
div
id
=
"container"
>
<
div
id
=
"grid"
></
div
>
<
script
>
$document.ready(function() {
$("#grid").kendoGrid({
id: "gridList",
dataSource: model,
schema: {
model: {
fields: {
IncidentType: { type: "string" },
Location: { type: "string" },
WatchDateTime: { type: "date" },
PostDateTime: { type: "date" }
}
},
pageSize: 10
},
height: 600,
scrollable: true,
sortable: true,
pageable: { input: true, numeric: false },
columns: [
{
field: "IncidentType",
title: "Incident Type",
width: 300
},
{
field: "Location",
title: "Location",
width: 100
},
{
field: "WatchDateTime",
title: "Incident Date",
width: 100
},
{
field: "PostDateTime",
title: "Post Date",
width: 100
}
]
});
});
</
script
>
</
div
>
Trying to add a % sign to a number in a Kendo NumericTextBox. You suggest escaping the % sign as such:
$("#numeric").kendoNumericTextBox({
format: "# \%"
});
but when I give it a value of 3, it still gives me 300%!
From your documentation:
"%" - percentage placeholder Multiplies a number by 100 and inserts a localized percentage symbol in the result string. Note: '%' symbol is interpreted as a format specifier in the format string. If you need to prevent this, you will need to precede the '%' symbol with a backslash -
'kendo.toString(12, "# \%")'
-> 12 % (en-us).