var template_navigation_menu = kendo.template('<li><a href="#=url#" target="#=target#" title="#=title#">#=text#</a></li>');var navigation_menu = $("#navigation_menu").kendoMenu();$(document).ready(function () { function navigation_menu_render() { $("#navigation_menu").html(kendo.render(template_navigation_menu, this.view())); } var datasource_navigation_menu = new kendo.data.DataSource( { transport: { read: "xml/navigation" + get_culture_path_modifier() + ".xml" }, schema: { type: "xml", data: "/navigation/menu/item", model: { fields: { item_id: "item_id/text()", parent_id: "parent_id/text()", text: "text/text()", url: "url/text()", target: "target/text()", title: "title/text()", google_sitemap_priority: "google_sitemap_priority/text()", google_sitemap_frequency: "google_sitemap_frequency/text()", main_inclusion: "main_inclusion/text()", footer_inclusion: "footer_inclusion/text()" } } }, change: navigation_menu_render }); datasource_navigation_menu.filter({ field: "main_inclusion", operator: "eq", value: "true" }); datasource_navigation_menu.read();});<?xml version="1.0" encoding="utf-8" ?><navigation> <menu> <item> <item_id>1</item_id> <parent_id>0</parent_id> <text>Home</text> <url>/</url> <target>_top</target> <title>Click here to return to the Home Page.</title> <google_sitemap_priority>1.0</google_sitemap_priority> <google_sitemap_frequency>daily</google_sitemap_frequency> <main_inclusion>true</main_inclusion> <footer_inclusion>true</footer_inclusion> </item> </menu> <menu> <item> <item_id>2</item_id> <parent_id>0</parent_id> <text>Item 1</text> <url>/item.html</url> <target>_top</target> <title>Click here to view item 1.</title> <google_sitemap_priority>0.8</google_sitemap_priority> <google_sitemap_frequency>daily</google_sitemap_frequency> <main_inclusion>true</main_inclusion> <footer_inclusion>true</footer_inclusion> </item> </menu> <menu> <item> <item_id>3</item_id> <parent_id>0</parent_id> <text>Item 2</text> <url>/item.html</url> <target>_top</target> <title>Click here to view item 2.</title> <google_sitemap_priority>0.5</google_sitemap_priority> <google_sitemap_frequency>daily</google_sitemap_frequency> <main_inclusion>true</main_inclusion> <footer_inclusion>true</footer_inclusion> </item> </menu> <menu> <item> <item_id>4</item_id> <parent_id>0</parent_id> <text>Item 3</text> <url>/item.html</url> <target>_top</target> <title>Click here to view item 3.</title> <google_sitemap_priority>0.8</google_sitemap_priority> <google_sitemap_frequency>weekly</google_sitemap_frequency> <main_inclusion>true</main_inclusion> <footer_inclusion>true</footer_inclusion> </item> </menu> <menu> <item> <item_id>5</item_id> <parent_id>0</parent_id> <text>Footer-Only Item 1</text> <url>/item.html</url> <target>_blank</target> <title>Click here to view item.</title> <google_sitemap_priority>0.3</google_sitemap_priority> <google_sitemap_frequency>monthly</google_sitemap_frequency> <main_inclusion>false</main_inclusion> <footer_inclusion>true</footer_inclusion> </item> </menu> <menu> <item> <item_id>6</item_id> <parent_id>0</parent_id> <text>Footer-Only Item 2</text> <url>/item.html</url> <target>_blank</target> <title>Click here to view item.</title> <google_sitemap_priority>0.3</google_sitemap_priority> <google_sitemap_frequency>monthly</google_sitemap_frequency> <main_inclusion>false</main_inclusion> <footer_inclusion>true</footer_inclusion> </item> </menu> <menu> <item> <item_id>7</item_id> <parent_id>0</parent_id> <text>Item 4</text> <url>/item.html</url> <target>_top</target> <title>Click here to view item.</title> <google_sitemap_priority>0.3</google_sitemap_priority> <google_sitemap_frequency>monthly</google_sitemap_frequency> <main_inclusion>true</main_inclusion> <footer_inclusion>true</footer_inclusion> </item> </menu> <menu> <item> <item_id>8</item_id> <parent_id>7</parent_id> <text>Item 4 - Sub Item 1</text> <url>/subitem.html</url> <target>_top</target> <title>Click here to view sub item.</title> <google_sitemap_priority>0.3</google_sitemap_priority> <google_sitemap_frequency>monthly</google_sitemap_frequency> <main_inclusion>true</main_inclusion> <footer_inclusion>true</footer_inclusion> </item> </menu></navigation>Hello,
We have a Kendo Grid UI that is databound with a remote JSON.
We want to use the build-in Popup window to add and edit a row.
Now there is one value that needs to be bound to a treeview.
The treenode with the ID of the databound Item should be preselected.
The new value of the selected node should be submitted to the webservice.
Neither is happening.
The TreeView is correctly shown. But is not selecting the right node.
Here my code :
/*
1 PART of the Grid
*/
editable: {
mode: "popup",
template: kendo.template($("#popup-editor-werkaanvraag").html())
},
edit: function(e){
var inlineDefault = new kendo.data.HierarchicalDataSource({
data: [
{text: "KK",id:0, items: [
{text: "Hoofdgebouw",id:150},
{text: "Pav 1",id:151},
{text: "Pav 2",id:152}
]},
{text: "SRF",id:1, items: [
{text: "Bed Linen",id:154},
{text: "Curtains & Blinds",id:155},
{text: "180",id:180}
]}
]
});
}
var treeview = e.container.find(".nested-treeview").kendoTreeView({
dataSource: inlineDefault
});
}
/*
2 PART of the Template
*/
<script id="popup-editor-werkaanvraag" type="text/x-kendo-template">
<div style="width:800px" date-role="treeview" class="nested-treeview" data-bind="value:locatie_id" ></div>
</script>

@Html.Kendo().NumericTextBoxFor(model => model.MyProperty).Step(0.01)