We have migrated to Telerik.Web.UI from Telerik.WebControls ,Telerik Version - 2021.3.914.45,.Net-4.8
Tried with get_allNodes() instead of AllNodes but no luck.
function getNodes() {
return this.getTree().AllNodes; //AllNodes is not returning Array
}
return {
getTree: function() {
if (!this.elements["tree"]) { this.elements["tree"] = window[this.element.getAttribute("tree")]; }
return this.elements["tree"];
},
getHiddenFieldEl: function() {
if (!this.elements["hidden"]) { this.elements["hidden"] = $(this.element.getAttribute("hf")); }
return this.elements["hidden"];
},
toString: function() { return "Simple Tree"; },
init: function() {
this.hasCheckBoxes = (this.element.getAttribute("checkmode") === "true");
Test.Controls.attachSubmitEvent(onSubmit, this, true);
},
validate: function(source, args) {
var isValid = false;
var allNodes = getNodes.call(this); //allNodes as Undefined
for(var i = 0, len = allNodes.length; i < len; i++) {
var node = allNodes[i];
if(!node.Checked) { continue; }
isValid = true;
break;
}
args.IsValid = isValid;
}
Can anyone please help to resolve this issue? what should be changed in the above code after migration?