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

Bind ColumnGroup Text

1 Answer 75 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 24 May 2017, 03:36 AM

Using MVVM I have a property to hold the value to be displayed in the ColumnGroup Text property

This fails to display the required text.

<telerik:GridViewColumnGroup  Name="ThisYearA" Header="{Binding Path=DataContext.lThisYearActual, RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type telerik:RadGridView}}}" />

Changing the x:Type to the Page also fails.

I have also bound the text to a hidden textblock, this also fails to display in the ColumnGroup

<telerik:GridViewColumnGroup  Name="ThisYearF" Binding ElementName=txtLastYearActual}" />

The textblock txtLastYearActual correctly displays the content.

 

1 Answer, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 24 May 2017, 09:03 AM

Resolved using this article 

Artificial Inheritance Contexts in WPF

Tags
GridView
Asked by
Mark
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Share this question
or