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

RadTreeView was blank when i set TreeViewItem Visibility=Collapsed how to fix it ?

5 Answers 290 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Liu
Top achievements
Rank 1
Liu asked on 12 Sep 2013, 07:49 PM
i was set RadTreeView Visibility=Collapsed,the RadTreeView  was empty blank.but SilverLight SDK Control's TreeView was fine.
CODE:
 <UserControl.Resources>
        <Convert:EntityVisualConvert x:Key="EConvert"/>
        <telerik:HierarchicalDataTemplate x:Key="MyDataTemplate" ItemsSource="{Binding Childrens}" >
            <StackPanel Orientation="Horizontal" Margin="2" Visibility="{Binding IsVisualble, Converter={StaticResource EConvert}, Mode=TwoWay}">
                <TextBlock  Text="{Binding Name}"   />
            </StackPanel>
        </telerik:HierarchicalDataTemplate>
        <Style x:Key="MyRadTreeViewItemStyle" TargetType="telerik:RadTreeViewItem">
            <Setter Property="Visibility" Value="{Binding IsVisualble, Converter={StaticResource EConvert}, Mode=TwoWay}" />
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5*"/>
            <ColumnDefinition Width="5*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2">
            <TextBlock>input number for testing</TextBlock>
            <TextBox TextChanged="TextBox_TextChanged"></TextBox>
        </StackPanel>
        <telerik:RadTreeView  Grid.Column="0"  Grid.Row="1"
                            x:Name="RadFunctionTree"  
                            CharacterSpacing="0" IsEditable="False"
                            HorizontalContentAlignment="Left" IsTextSearchEnabled="True"  ItemsIndent="5" 
                            ItemTemplate="{StaticResource MyDataTemplate}" ItemContainerStyle="{StaticResource MyRadTreeViewItemStyle}" />


        <sdk:TreeView  Grid.Row="1" Name="FunctionTree" Grid.Column="1" >
            <sdk:TreeView.ItemContainerStyle>
                <Style TargetType="sdk:TreeViewItem">
                    <Setter Property="Visibility" Value="{Binding IsVisualble, Converter={StaticResource EConvert}, Mode=TwoWay}" />
                    <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
                </Style>
            </sdk:TreeView.ItemContainerStyle>

            <sdk:TreeView.ItemTemplate>
                <sdk:HierarchicalDataTemplate ItemsSource="{Binding Childrens}">
                    <StackPanel Orientation="Horizontal" Margin="2" Visibility="{Binding IsVisualble, Converter={StaticResource EConvert}, Mode=TwoWay}">
                        <!--<Image Width="16" Height="16"  Margin="1" Stretch="Fill" Source="{Binding F_FuncICON, Converter={StaticResource IConcConvert}}"  />-->
                        <TextBlock  Text="{Binding Name}"   />
                    </StackPanel>
                </sdk:HierarchicalDataTemplate>
            </sdk:TreeView.ItemTemplate>
        </sdk:TreeView>
    </Grid>

Thank you...

5 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 17 Sep 2013, 02:45 PM
Hi Liu,

I tried to reproduce your issue on our side with our latest official release and it seems like the code works as expected. The behavior of the control can be seen in the following picture.


As you can see the third item disappears when I set its Visibility to Collapsed.

Can you please clarify which version of our dlls you use. Also, it will be great if you can reproduce the reported behavior in a separate project and send it over. By doing so I will be able to further investigate the reasons behind the reported behavior.

Thank you for your kind cooperation.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Liu
Top achievements
Rank 1
answered on 17 Sep 2013, 08:21 PM
Thank your reply!

I was using  2013_2_0724 trial 

my App Demo  SilverlightApplication7.7z was on SkyDriver,

http://sdrv.ms/1a1smOc

Is my server-side Code Bug ?

Thank you~
0
Pavel R. Pavlov
Telerik team
answered on 20 Sep 2013, 02:54 PM
Hi Liu,

Thank you for providing me with details about your scenario. I actually tested the ItemVisibility property of the RadTreeViewItem. Please accept my apology for misleading you with my previous post.

Please note that this property is exposed in our latest internal build. You can download it from your Telerik account. Please test your project with these libraries and let me know if you can achieve your requirement.

I am looking forward to hearing from you.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Liu
Top achievements
Rank 1
answered on 21 Sep 2013, 05:24 AM
Thanks your reply~
I was using Telerik Control Panel  with my account upgraded TeleRik‘s sliverlight Control To Version 2013.2.724
Please view my attached file version.png~

the project references TeleRik's silverlight Control  dll's version was 2013.2.724.1050
but RadTreeView in my test application  still  with blank space
Please view my attached file~
Could you please test my app in my skydirver ? maybe can found what’s wrong with it!

SilverlightApplication7.7z was on SkyDriver,
http://sdrv.ms/1a1smOc

Thank you again!
0
Accepted
Pavel R. Pavlov
Telerik team
answered on 25 Sep 2013, 01:47 PM
Liu,

The version that you use (2013.2.724.1050) is our service pack version. Please note that the property that I tested is exposed in our latest internal build (LIB) version of our controls. The actual version of our LIB is 2013.2.923.1050.

Please give it a try and let us know if it works for you.

TIP: you should configure your manager to notify you when a LIB is available. For more information please refer to this and this articles.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
TreeView
Asked by
Liu
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Liu
Top achievements
Rank 1
Share this question
or