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

Binding for SelectedItem

1 Answer 93 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Sternico
Top achievements
Rank 1
Sternico asked on 28 Jan 2010, 10:52 AM
Hello,

I need to bind the SelectedItem of the TreeView. I've read in other posts, that this is impossible. (why?) You've suggested to Bind the IsSelected-Property of the TreeViewItems. And thats exactly the way I do it in WPF. But when I try to bind a Property in a Silverlight-Style, I get a XamlParseException: "AG_E_RUNTIME_MANAGED_UNKNOWN_ERROR".

I've did it the way you descriped in an other post:

<telerik:RadTreeView.ItemContainerStyle>
   <Style TargetType="telerik:RadTreeViewItem">
      <Setter Property="IsSelected" Value="{Binding Path=Select, Mode=TwoWay}" />
   </Style >
</telerik:RadTreeView.ItemContainerStyle>

Where is my mistake?

1 Answer, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 28 Jan 2010, 12:10 PM
Hi Sternico,

We apologize for the mistake in our online help documentation.
In Silverlight you have to use ContainerBinding instead.
Please take a look at the following article and example:
http://www.telerik.com/support/kb/silverlight/treeview/radtreeview-and-hierarchicaldatatemplate.aspx

Regards,
Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TreeView
Asked by
Sternico
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Share this question
or