RadTreeViewItem.Command does not fire after another item is programmatically set as selected

2 posts, 0 answers
  1. Ricky
    Ricky avatar
    2 posts
    Member since:
    Sep 2012

    Posted 04 Dec 2012 Link to this post

    I have a set of tabbed views that correspond to RadTreeViewItems so that when the treeViewItem is clicked, the correct tab is selected and when a different tab is clicked, the correct treeViewItem is selected.  I am binding to the RadTreeViewItem.Command property so that I am notified when the user clicks on the treeViewItem..

    The problem is that programmatically changing the IsSelected property of a treeViewItem does not "reset the active" treeViewItem, meaning that the original treeVIewItem will not fire its Command when the user clicks on it.  Visually, everything looks correct, but I don't know how to notify the treeview that I programmatically changed the active treeViewItem.

    Example, the user clicks on treeViewItem1 --> treeViewItem1 highlights and then highlights tab1.  The user then selects tab2 --> tab2 highlights and treeViewItem2.IsSelected is set to true.  When the user clicks back on treeViewItem1, its Command is not fired. 

    Additionally, I do not want the treeViewItem that is programmatically set as IsSelected to fire its Command.  That would cause in infinite loop in my current code.
  2. Ricky
    Ricky avatar
    2 posts
    Member since:
    Sep 2012

    Posted 06 Dec 2012 Link to this post

    Working with a group of programmers in a scrum team is FUN!  It seems that some other code was setting the IsEnabled flag to false but the GUI item was not grayed out so I did not know it was disabled.
  3. UI for WPF is Visual Studio 2017 Ready
Back to Top