unable to highlight the treeview item dynamically through code

2 posts, 0 answers
  1. Kiran Mandapati
    Kiran Mandapati avatar
    3 posts
    Member since:
    Feb 2010

    Posted 03 Aug 2011 Link to this post

    Hi Telerik,

    we are unable select an item through code. we used the item.IsSelected=true. though it highlited in different color from the one which is shown when we clicked manually. Please could you help us resolving this.
  2. Petar Mladenov
    Petar Mladenov avatar
    3140 posts

    Posted 08 Aug 2011 Link to this post

    Hi Kiran Mandapati,

    Selecting through code leads to "SelectionUnfocused" visual state and you see the RadTreeViewItem with gray background. When you select with mouse , you also focus the RadTreeViewItem and it goes to "SelectionFocused" visual state (orange-like background). You either have to focus the item in the code or change the default style of the RadTreeViewItem and play with the mentioned colors (they are Backgrounds in the "SelectionFocused" and "SelectionUnfocused" Borders).

    Petar Mladenov
    the Telerik team

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

Back to Top