This question is locked. New answers and comments are not allowed.
Hello,
I've got a treeview with a custom hierarchical template ... I need to add a checkbox to it, with the treestate... how can I do this without having to specify the treeview checkbox behavior manually??
consider the following class
The level 1-4 template are defined so :
While the Level 5 is :
Thanks
Paolo
I've got a treeview with a custom hierarchical template ... I need to add a checkbox to it, with the treestate... how can I do this without having to specify the treeview checkbox behavior manually??
consider the following class
[DataContract] public class ListaContainer { [DataMember] public string NomeLista { get; set; } [DataMember] public List<Banca> Banca { get; set; } //[DataMember] } [DataContract] public class Level1 { [DataMember] public string Descrizione { get; set; } [DataMember] public List<Level2> Level2s { get; set; } } [DataContract] public class Level2 { [DataMember] public string Descrizione { get; set; } [DataMember] public List<Level3> Level3s { get; set; } } [DataContract] public class Level3 { [DataMember] public string Descrizione { get; set; } [DataMember] public List<Level4> Level4s{ get; set; } } [DataContract] public class Level4 { [DataMember] public string Descrizione { get; set; } [DataMember] public List<Level5> Level5s { get; set; } } [DataContract] public class Level5 { [DataMember] public int IDInterno { get; set; } [DataMember] public string Descrizione { get; set; } }The level 1-4 template are defined so :
<telerik:HierarchicalDataTemplate x:Key="Level2" ItemsSource="{Binding Level3s}"> <StackPanel Orientation="Horizontal" Height="16"> <Image Source="{Binding Converter={StaticResource Imageconverter},ConverterParameter=Level2}" Height="16" Width="16" Margin=" 0,0,6,0" /> <TextBlock Text="{Binding Descrizione}"/> </StackPanel> </telerik:HierarchicalDataTemplate>While the Level 5 is :
<DataTemplate x:Key="xxx"> <StackPanel Orientation="Horizontal" Height="16"> <Image Source="{Binding Converter={StaticResource Imageconverter},ConverterParameter=xxx}" Height="16" Width="16" Margin=" 0,0,6,0" /> <!--<TextBlock Text="{Binding Descrizione}"/>--> <HyperlinkButton Content="{Binding Descrizione}" Tag="{Binding IDInterno}" Click="HyperlinkButton_Click"></HyperlinkButton> </StackPanel> </DataTemplate>Thanks
Paolo