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

unable to highlight the treeview item dynamically through code

1 Answer 73 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Kiran Mandapati
Top achievements
Rank 1
Kiran Mandapati asked on 03 Aug 2011, 11:43 AM
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.

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 08 Aug 2011, 09:46 AM
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).

Greetings,
Petar Mladenov
the Telerik team

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

Tags
TreeView
Asked by
Kiran Mandapati
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or