Hello,
I'd like to catch the checked/unckecked item.
As you describe in your documentation : http://www.telerik.com/help/wpf/telerik.windows.controls.navigation-telerik.windows.controls.radtreeview-unchecked_ev.html
I've tried this :
if (uncheckedItem == null) return;
SphItem oItem = uncheckedItem.DataContext as SphItem;
if (oItem != null && OnUncheckedItem != null) OnUncheckedItem(oItem);
But uncheckedItem is always null.
If I use e.Originalsource, i get a RadTreeViewItem, but not the leaf one.
image my tree is like this :
part1
|--- elt1
|--- elt2
I unchecked elt2, i obtain part1 in my datastructure SphItem...
Thanks for your help
Aurore
I'd like to catch the checked/unckecked item.
As you describe in your documentation : http://www.telerik.com/help/wpf/telerik.windows.controls.navigation-telerik.windows.controls.radtreeview-unchecked_ev.html
I've tried this :
void RadTreeView1_Unchecked(object sender, RadRoutedEventArgs e)
{
// get a reference to the item that has been unchecked
RadTreeViewItem uncheckedItem = e.Source as RadTreeViewItem;
if (uncheckedItem == null) return;
SphItem oItem = uncheckedItem.DataContext as SphItem;
if (oItem != null && OnUncheckedItem != null) OnUncheckedItem(oItem);
}
But uncheckedItem is always null.
If I use e.Originalsource, i get a RadTreeViewItem, but not the leaf one.
image my tree is like this :
part1
|--- elt1
|--- elt2
I unchecked elt2, i obtain part1 in my datastructure SphItem...
Thanks for your help
Aurore