If I put IsTriStateMode="True", I have problem because after I save on DB, if I check the parent node, the children are not checked.
The first time it works, after I save on the DB and the page is reloaded it happens the following error:
when I check the parent only the first or the second child is checked (one time the first, second time the second) and the parent is not checked, or If I have checked some child the following child is checked and the others child that were checked are not more checked and the parent is not more checkable and it remains unchecked.
Is this due to the hierarchical data template ? here is the xaml:
<
UserControl.Resources>
<slv:ValidatorManager x:Name="ProfileValidator"></slv:ValidatorManager>
<converters:CheckToProfileConverter x:Name="checkToProfileConverter"></converters:CheckToProfileConverter>
<converters:BooleanToVisibilityConverter x:Name="booleanToVisibilityConverter"></converters:BooleanToVisibilityConverter>
<tlkControls:ContainerBindingCollection x:Key="TreeItemContainerBindings">
<tlkControls:ContainerBinding
PropertyName="CheckState"
Binding="{Binding IsChecked, Converter={StaticResource checkToProfileConverter}, Mode=TwoWay}" />
</tlkControls:ContainerBindingCollection>
<tlkControls:HierarchicalDataTemplate x:Key="MenuItemsTemplate"
ItemsSource="{Binding ItemsWrapped, Mode=TwoWay}"
tlkControls:ContainerBinding.ContainerBindings="{StaticResource TreeItemContainerBindings}">
<StackPanel Orientation="Horizontal">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*"></ColumnDefinition>
<ColumnDefinition Width="1"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="1"></ColumnDefinition>
<ColumnDefinition Width="150"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding Immagine}" Height="16" Margin=" 0,0,6,0" />
<TextBlock Grid.Column="2" Text="{Binding Titolo}" Height="16" Foreground="Black" FontSize="12" Width="150" />
<tlkEx:RadComboBoxEx x:Name="cmbOperazione"
Visibility="{Binding IsChecked, Converter={StaticResource booleanToVisibilityConverter}, Mode=TwoWay}"
Width="100"
IsTextSearchEnabled="True"
HorizontalAlignment="Left"
Grid.Column="4"
Margin="0 0 22 0"
ItemsSource="{Binding OperazioneItems, Mode=TwoWay}"
SelectedItem="{Binding OperazioneSel, Mode=TwoWay}"
SelectedValue="{Binding OperazioneSel.IdOperazione, Mode=OneTime}"
SelectedValuePath="IdOperazione"
DisplayMemberPath="Descrizione"
>
<slv:ValidatorService.Validator>
<slv:RequiredRadComboValidator ManagerName="ProfileValidator" ErrorMessage="{Binding Path=Strings.anagValidatorRequired, Source={StaticResource resx}}" />
</slv:ValidatorService.Validator>
</tlkEx:RadComboBoxEx>
</Grid>
</StackPanel>
</tlkControls:HierarchicalDataTemplate>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<common:loader x:Name="profileLoader" Visibility="Collapsed" />
<tlkNavigation:RadTreeView x:Name="gvTree"
HorizontalAlignment="Left" VerticalAlignment="Top"
SelectionMode="Extended"
IsOptionElementsEnabled="True"
ItemsOptionListType="CheckList"
IsTriStateMode="True"
ItemTemplate="{StaticResource MenuItemsTemplate}" />
</Grid>