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

Gridview header disappears when mouse is hovered over the header

2 Answers 56 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 01 Feb 2018, 11:29 AM

Hi,

 

I am trying to make a universal style which would show header tooltip for every column in a gridview. In generic.xml I defined this style:

<Style TargetType="telerik:GridViewHeaderCell">
     <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Content}" />
</Style>

This does show the tooltip, however when mouse pointer is hovered over the column header then the actual column header gets cleared. The tooltip stays. I tried to set binding mode to TwoWay but it doesn't change this behavior. How can this be fixed if I'd like to keep styling global?

 

2 Answers, 1 is accepted

Sort by
0
Alex
Top achievements
Rank 1
answered on 02 Feb 2018, 11:21 AM

Hi Telerik Team,

could you please reply? Even if my question is invalid in any way, could you please let me know?

With lack of answer, I updated my XAML with new data definition as explained in your documentation:

<telerik:GridViewDataColumn DataMemberBinding="{Binding Name}"><telerik:GridViewDataColumn.Header><TextBlock Text="Name" ToolTipService.ToolTip="My very long header"/></telerik:GridViewDataColumn.Header></telerik:GridViewDataColumn>

https://docs.telerik.com/devtools/wpf/controls/radgridview/how-to/create-tooltip

 

This created two problems straight away: styling of grid headers broke (try to hover over) and also excel export fails to pick up new updated header. To avoid unwanted coding, I would still prefer to fix the binding if this is possible. Could you please advise?

 

 


0
Alex
Top achievements
Rank 1
answered on 02 Feb 2018, 02:05 PM
I sorted it out by adding a converter
Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Alex
Top achievements
Rank 1
Share this question
or