New to Telerik UI for WPF? Download free 30-day trial

How to Bind the Content in the Header Cell to RadGridView's DataContext


Product Version 2019.3.917
Product RadGridView for WPF


How to bind the header cells' content to properties in RadGridView's DataContext.


As the DataContext of the GridViewHeaderCell is different than the one of its parent RadGridView control, in order to bind properties of its content to such in the viewmodel, you need to use a RelativeSource binding.

<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"> 
        <TextBlock Text="{Binding DataContext.NamePropertyString, RelativeSource={RelativeSource AncestorType=telerik:RadGridView}}" /> 
In this article