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

checked event

1 Answer 59 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Aurore asked on 19 Jul 2010, 04:09 PM

I'd like to catch the checked/unckecked item.

As you describe in your documentation :

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 :
  |--- elt1
  |--- elt2
I unchecked elt2, i obtain part1 in my datastructure SphItem...

Thanks for your help

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 20 Jul 2010, 03:04 PM
Hi Aurore,

If you are binding the TreeView you need to get the OriginalSource.

If you are using the checkboxes in TriState mode - you will receive events for all the items that has been checked ( not only the item that was clicked by the user).

Please let us know if you need more help.

Sincerely yours,
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question