Binding GridViewColumnGroup in TreListView

2 posts, 0 answers
  1. Pablo
    Pablo avatar
    8 posts
    Member since:
    Feb 2016

    Posted 18 Nov 2016 Link to this post


    Binding 'Header' property to DataContext in a GridVewColumnGroup doesn't work. Public property is not requested to DataContext.

        <telerik:GridViewColumnGroup Name="RangeColumn" Header="{Binding FirstDependencyName, FallbackValue=Nothing}" />

    By other hand, a binding to StaticResource works property.

        <telerik:GridViewColumnGroup Name="RangeColumn" Header="{Binding Source={StaticResource appResx}, Path=btn_Create}" />

    In next example, public property is requested to DataContext (value is received tested with a converter), but surprisingly it is not displayed.

        <telerik:GridViewColumnGroup Name="RangeColumn">
                <TextBlock Text="{Binding FirstDependencyName, FallbackValue=Nothing}"/>

    Do you have any suggestion?
    Thank you
  2. Dilyan Traykov
    Dilyan Traykov avatar
    696 posts

    Posted 21 Nov 2016 Link to this post

    Hello Pablo,

    In order to successfully bind the Header property to a property of your view model, you will need to specify the Source for this binding. I'm attaching a sample project with the implementation.

    Please let me know if this works for you.

    Dilyan Traykov
    Telerik by Progress
    Telerik UI for WPF is ready for Visual Studio 2017 RC! Learn more.
Back to Top