Completed
Last Updated: 22 Aug 2018 17:28 by Werner
ADMIN
Petar Mladenov
Created on: 11 Nov 2016 08:36
Category: TreeView
Type: Bug Report
1
TreeView: HeaderStringFormat property of RadTreeViewItem does not apply
Setting the HeaderStringFormat of RadTreeViewItem does not format the Header.

As a workaround, HeaderTemplate of RadTreeViewItem could be set which has TextBlock with StringFormat property set on its Text Binding.



 <DataTemplate x:Key="template">
                <TextBlock Text="{Binding ., StringFormat='Received ({0:N0})'}" />
</DataTemplate>


Available in LIB version: 2016.3.1121
1 comment
Werner
Posted on: 22 Aug 2018 17:28
Just tried the same with 2018.2 still does not work - a workaround causes overhead and less readable xaml => StringFormat should work

                <telerik:RadTreeViewItem Header="{Binding InafModel.INafModel_Entities.Count, StringFormat=Entities ({0})}" 
                                         ItemsSource="{Binding InafModel.INafModel_Entities}"
                                         ItemTemplate="{StaticResource Entity_DataTemplate}"/>