I have a splitter with two windows, left holds a treeview, the right a partial view that depends on the selected node in the treeview to select the content (via an onSelect event).
The problem is that this code sometimes works perfectly and sometimes does not - specifically it renders the "parent" page (including the splitter, treeview etc) inside the right hand pane.
I'm a newbie with MVC, javascript etc so have no idea where the problem is - nor can I reproduce it at will.
The javascript snippit is:
function onSelect(e) {
try {
var treeView = e.sender;
var text = treeView.text(e.node);
var data = treeView.dataItem(e.node);
var id = data.id;
console.log(id, text);
var parent = null;
try {
parent = treeView.text(e.node.parentNode);
} catch (e) {
console.log(e.message);
}
$("#splitter").kendoSplitter();
var splitter = $("#splitter").data("kendoSplitter");
switch (text) {
case "Case":
splitter.ajaxRequest("#right-pane", "PartialCase", { id: id });
break;
And using the F12 debug I can follow it to the "splitter.ajaxRequest" line at which point it populates the right window with the parent page.
I hope this is something stupid.
Thanks