This is a migrated thread and some comments may be shown as answers.
HierarchicalDataTemplate & IsCheckable
3 Answers 17 Views
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 29 Sep 2011, 02:02 PM

I'm having an issue with the HierarchicalDataTemplate & IsCheckable , I have seen a few posts about it here but none seem to answer my problem.

I have a hierarchical data source on a menu, when I run my project without the IsCheckable property the menu has its items and sub items. However when I add the IsCheckable property only the top level of the menu shows and it is checkable. 

Any ideas why ? 

Richard

<telerik:HierarchicalDataTemplate x:Key="FilterMenuTemplate" ItemsSource="{Binding SubItems}">
    <telerik:ContainerBinding.ContainerBindings>
        <telerik:ContainerBindingCollection>
            <telerik:ContainerBinding PropertyName="IsChecked"  Binding="{Binding IsChecked, Mode=TwoWay}" />
            <telerik:ContainerBinding PropertyName="IsCheckable" Binding="{Binding IsCheckable}" />
            <telerik:ContainerBinding PropertyName="StaysOpenOnClick" Binding="{Binding IsCheckable}" />
        </telerik:ContainerBindingCollection>
    </telerik:ContainerBinding.ContainerBindings>
    <TextBlock Text="{Binding Text}" />
</telerik:HierarchicalDataTemplate>

3 Answers, 1 is accepted

Sort by
0
Accepted
Pana
Telerik team
answered on 30 Sep 2011, 09:40 AM
Hi Richard,

IsCheckable = True items are considered checkboxes and do not show subitems. You could still set IsChecked on a non checkable item but if you want the submenus to appear mark their parents as non checkable.

Best wishes,
Pana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Richard
Top achievements
Rank 1
answered on 30 Sep 2011, 03:03 PM
I see,  I need the parent to be clickable but as this is for a generating a report I think I'll be able to use the TreeView to achieve my goals.

Thanks,
Richard 
0
Pana
Telerik team
answered on 30 Sep 2011, 03:06 PM
Hello Richard,

In such case a RadTreeView would indeed serve better your scenario.

Best wishes,
Pana
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Menu
Asked by
Richard
Top achievements
Rank 1
Answers by
Pana
Telerik team
Richard
Top achievements
Rank 1
Share this question
or