The mentioned error is probably caused by this cast:
nd = (RadTreeViewItem)ndcol[iCount];
in your code. You can assign only RadTreeViewItem only to RadTreeViewItem. Please double check this line. On a side note please have in mind that when you populate RadTreeView you have to use either its ItemsSource collection only or its Items collection only. ItemsSource when you bind the RadTreeView to business objects and Items when you directly add RadTreeViewItems.
DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.