This is a migrated thread and some comments may be shown as answers.

RadTreeViewItem.get_nextitem()

1 Answer 13 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Sebastian
Top achievements
Rank 1
Sebastian asked on 21 Nov 2011, 12:54 PM
Hello,

i have a problem with a RadTreeView i do not know how to deal with.

I have a TreeView with a HierarchicalDataTemplate.
I poulate the tree by assigning a List<myClass> to its ItemSource.
SelectedItem is set at start and then in SelectionChanged eventhandler.

Everythign works as it is expected, unless i try to navifate not by Mouse but Keyboard.
KeyDown and KeyUp result in the following error:

bei Telerik.Windows.Controls.RadTreeViewItem.get_PreviousItem()
 
bei Telerik.Windows.Controls.RadTreeView.HandleUpArrowKey(KeyEventArgs e)
 
bei Telerik.Windows.Controls.RadTreeView.HandleKeyDown(KeyEventArgs e)
 
bei Telerik.Windows.Controls.RadTreeViewItem.OnKeyDown(KeyEventArgs e)
 
bei System.Windows.Controls.Control.OnKeyDown(Control ctrl, EventArgs e)
 
bei MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
repectively get_NextItem() in the first line.

what can i do to avoid that?
This happens in all TreeViews that are populated that way, as far as i can see.

Regards
Seb

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 24 Nov 2011, 01:30 PM
Hello Sebastian,

 We are not aware of such existing issue in the RadTreeView and we were also unable to reproduce it. Could you please check out our test project, modify it if needed or let us know if we are missing something ? You can also send us a runnable sample so that we could investigate it better and provide you a solution or workaround.
On a side note, we highly suggest you to use ObservableCollection<> instead of List<> when you bind your RadTreeView. This is mandatory if you want to perform Drag/Drop operations for example.

Best wishes,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TreeView
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or