about RadTreeView's IsInEditMode property

1 posts, 0 answers
  1. Bill
    Bill avatar
    8 posts
    Member since:
    Dec 2012

    Posted 27 Apr 2013 Link to this post

    Hi telerik:
         View:
    <Window.Resources>
            <HierarchicalDataTemplate x:Key="TreeItemTemplate" ItemsSource="{Binding Children}">
                <TextBlock Text="{Binding Header}" />
            </HierarchicalDataTemplate>
            <Style TargetType="telerik:RadTreeViewItem">
                <Setter Property="IsExpanded" Value="true" />
                <Setter Property="IsSelected" Value="{Binding Selected, Mode=TwoWay}" />
                <Setter Property="IsExpanded" Value="{Binding Expanded, Mode=TwoWay}" />
                <Setter Property="IsEditable" Value="{Binding IsEditable, Mode=TwoWay}"/>
                <Setter Property="IsInEditMode" Value="{Binding IsInEditMode, Mode=TwoWay}"/>
            </Style>
        </Window.Resources>
        <Grid>
            <StackPanel>
                <Button Content="Add" Margin="0,20" Width="40" HorizontalAlignment="Left" Click="Button_Click"></Button>
            <telerik:RadTreeView Grid.Row="1" IsEditable="True"
                    telerik:AnimationManager.IsAnimationEnabled="False" ItemsSource="{Binding Items}"
                    ItemTemplate="{StaticResource TreeItemTemplate}"
                                 ScrollViewer.VerticalScrollBarVisibility="Auto"/>
            </StackPanel>
        </Grid>


    When I Add a Item,set the IsInEditMode=true,click the Add button continuously,the last time added item,the Name will be null

    why?

Back to Top