Cannot implicitly convert type 'System.Collections.Generic.IList<Telerik.Web.UI.RadTreeNode>' to 'System.Collections.ArrayList'. An explicit conversion exists (are you missing a cast?)

0 Answers 46 Views
TreeView
Sachita
Top achievements
Rank 1
Iron
Iron
Iron
Sachita asked on 03 Jan 2022, 08:56 AM | edited on 03 Jan 2022, 08:57 AM

Hi Team,

Telerik 2021.3.914.45,Edge Browser,.Net FramworkVersion- 4.8

Getting error with ArrayList GetAllNodes()

ArrayList allNodes = _treeView.GetAllNodes();    //Gettting error 
 for (int i = 0; i < allNodes.Count; i++)
                    {
                        RadTreeNode node = allNodes[i];                                      //Getting Error
                        if (node.Checked && node.Parent == null)
                    }

Tried with below changes:
 List<Telerik.Web.UI.RadTreeNode> allNodes = (List<Telerik.Web.UI.RadTreeNode>)_treeView.GetAllNodes();
But no luck>

Can anyone help me out to resolve the above issue  with sample code?

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Sachita
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or