or
The Demo here:
http://demos.kendoui.com/web/mvvm/widgets.html
Shows how to bind to a number of widgets in the Kendo UI library. But I haven't had luck with some others including the menu. I've tried to convert the example here:
http://demos.kendoui.com/web/menu/index.html
To use the MVVM framework in the most straighforward manner. To be sure the KendoUI library was properly referenced, I put the MVVM test together with the non-MVVM method show in the demo. The result is that only the non-MVVM method works. The MVVM menu does not render (it shows up empty - just a thin horizontal line). There are no runtime errors or exceptions thrown.
HTML:
<body>
<ul id="menu">
</ul>
<br />
<ul data-role="menu" data-bind="source: dataSource">
</ul>
</body>
JavaSript:$(document).ready(documentReady);
var viewModel = {
dataSource: [
{
text: "Menu Item 1",
items: [
{ text: "Sub Menu Item 1" },
{ text: "Sub Menu Item 2" }
]
},
{ text: "Menu Item 2" }
]};
function documentReady() {
$("#menu").kendoMenu(viewModel);
kendo.bind($("body"), kendo.observable(viewModel));
}
<li><label>State ID: <input class="k-textbox" name="state-id" maxlength="50" type="text" data-bind="value: stateId" pattern="OH00[0-9]{8}" validationMessage="Please enter a state ID in the form of OH0012345678"/></label> <span class="k-invalid-msg" data-for="state-id"></span></li>$("input[name='state-id']").kendoMaskedTextBox({ mask: "OH0099999999" });[ { "chartitems": [ { "high": 50, "index": 0, "low": 180, "medium": -34, "name": "Building 0" }, { "high": 45, "index": 1, "low": 145, "medium": 22, "name": "Building 1" }, "Title": "test", "LegendPosition": "top" }]var dataSource = new kendo.data.DataSource({ transport: { read: { url: "data/chart.json", dataType: "json" } }, schema: { data: "chartitems" }}); var bar = $("#chart").kendoChart({ dataSource: dataSource,
categoryAxis: {
field: "name"
},
series: [{
name: "Medium",
field: "medium"
},
{
name: "Low",
field: "low"
}]
});...transport: { read: { url: "/RestApi/directory?format=json", dataType: "json", data: { search: $model.get("searchterm") } } },