CurrentItem on Tree?

2 posts, 0 answers
  1. Julien
    Julien avatar
    236 posts
    Member since:
    Jul 2010

    Posted 21 Sep 2010 Link to this post


    What is the correspondence of the RadGridView and the RadTreeView??

    Not the SelectedItem, but the CurrentItem, BECAUSE:

    There is no "SelectionChanging", so I'm forced to code myself the revert to the previous element if my conditions aren't satisfied.

    Then I was doing something like:

    private void uxRadTreeView_SelectionChanged(object sender, SelectionChangedEventArgs e)
      if (!isReverting && MyConditionsHere){
        isReverting = true;
        MainTree.SelectedItem =e.RemovedItems[0];
        isReverting = false;

    The object seems to be "selected", but doesn't change:

    image of the selected item problem

    File2 is the File on which I've made a "MainTree.SelectedItem= e.RemovedItems[0]"

    The File1 is the e.AddedItem[0].

    Without the SelectedItem manipulation, I don't see the dashed border on it.

    Thank you.
  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 23 Sep 2010 Link to this post

    Hi Julien,

    You can cancel the selection by handling the RadTreeView PreviewSelectionChanged() event. Please try that  approach and let us know if it works for you.

    Kind regards,
    Tina Stancheva
    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
Back to Top