Hi,
I have some problems with the HeaderCellStyle. I want to show a TextBlock in the HeaderCell with the text coming from the GridViewDataColumn's Header property.
My style definition:
Usage of this style:
I'm doing this, because I want to use the style on almost all my columns and to apply a tooltip to the TextBlock in code behind.
The problem is, that I don't know what to use as the binding in my ControlTemplate to show the header text.
regards Thomas
I have some problems with the HeaderCellStyle. I want to show a TextBlock in the HeaderCell with the text coming from the GridViewDataColumn's Header property.
My style definition:
<
UserControl.Resources
>
<
Style
TargetType
=
"telerik:GridViewHeaderCell"
x:Key
=
"TextBlockStyle"
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
TargetType
=
"telerik:GridViewHeaderCell"
>
<
TextBlock
Text
=
"{Binding Path=.}"
/>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
UserControl.Resources
>
Usage of this style:
<telerik:GridViewDataColumn HeaderCellStyle="{StaticResource TextBlockStyle}" Header="HeaderText" DataMemberBinding="{Binding Path=BindingPath}"
I'm doing this, because I want to use the style on almost all my columns and to apply a tooltip to the TextBlock in code behind.
The problem is, that I don't know what to use as the binding in my ControlTemplate to show the header text.
regards Thomas