Hi There, I have a treeview that I initialize with a datasource, and on the dataBound event (After the tree finishes loading) I select a node within the tree. This works in both Firefox and Chrome, but it errors in IE 11. Here is the code I use to initialize the tree. I have validated that the code is retrieving the correct UID as a string before it tries to select the node. I Bolded the code below where the issue is occurring. The Error happens on tree.select(item).
$(treeid).kendoTreeView({
template: kendo.template($("#treeview-template").html()),
dataSource: myItems,
loadOnDemand: false,
dataTextField: ["Name", "Name"],
select: onSelect,
dataBound: function (e) {
var tree = $(treeid).data('kendoTreeView');
if (itemId !== 0) {
//select item based on url
if ($("#" + itemId).length > 0) {
var uid = $("#" + itemId).closest("li").data("uid");
if (typeof uid !== 'undefined' && uid !== '') {
item = tree.findByUid(uid);
tree.select(item);
tree.trigger("select", {
node: item
});
}
}
}
tree.expand(".k-item");
}
});
I attached a JPG of the Error I recieve, and also a JPG of the console.log value of the node that gets returned from the findByUid Method.