Hi,
I want to define a tooltip that will shown, when mouse is over the title of the column.
Used the below code xaml for tooltip, but it is not showing tooltip.
<telerik:GridViewDataColumn Header="First Name"
DataMemberBinding="{Binding FirstName}" ToolTip="First Name Tooltip" />
I am missing any thing.
Thanks,
-Narendra
9 Answers, 1 is accepted
0
Hello Narendra,
Use the following code to add a tooltip to column headers:
Kind regards,
Vanya Pavlova
the Telerik team
Use the following code to add a tooltip to column headers:
<telerik:RadGridView Name="radGridViewHeaderCellTooltip" ItemsSource="{Binding}"> <telerik:RadGridView.Resources> <Style TargetType ="{x:Type telerik:GridViewHeaderCell}"> <Setter Property="ToolTip" Value="{Binding Content, RelativeSource={RelativeSource Self}}"/> </Style> </telerik:RadGridView.Resources> </telerik:RadGridView>Kind regards,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Narendra
Top achievements
Rank 1
answered on 10 Aug 2010, 08:13 AM
Thanks for the response.
Is there any other way like setting property of GridViewColumn?
Is there any other way like setting property of GridViewColumn?
0
Hello Narendra,
Generally there is no built-in property that will set the tooltip of the header in this way,you should implement it yourself and GridViewHeaderCellStyle is the easiest way to achieve this result.
All the best,
Vanya Pavlova
the Telerik team
Generally there is no built-in property that will set the tooltip of the header in this way,you should implement it yourself and GridViewHeaderCellStyle is the easiest way to achieve this result.
All the best,
Vanya Pavlova
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
0
Hello Narendra,
Please refer to the following markup, which shows the easiest way to implement a tooltip in GridviewHeaderCell:
You can create the tooltip either in xaml or in code-behind, you can bind it to the property value of your custom object and feel free to modify the code below in in the way you need.
Regards,
Vanya Pavlova
the Telerik team
Please refer to the following markup, which shows the easiest way to implement a tooltip in GridviewHeaderCell:
<UserControl.Resources> <Style x:Key="style1" TargetType="telerik:GridViewHeaderCell"> <Setter Property="ToolTipService.ToolTip" Value="I am a ToolTip"/> </Style> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <telerik:RadGridView x:Name="gridView1" ShowInsertRow="True" AutoGenerateColumns="False"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="ID" HeaderCellStyle="{StaticResource style1}" DataMemberBinding="{Binding ID}"/> </telerik:RadGridView.Columns> </telerik:RadGridView> </Grid>You can create the tooltip either in xaml or in code-behind, you can bind it to the property value of your custom object and feel free to modify the code below in in the way you need.
Regards,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Paul
Top achievements
Rank 1
answered on 16 Apr 2013, 03:44 PM
This xaml does indeed add a tool tip when hovering over a column header. But, afterwards the column header goes blank. Any ideas?
0
Paul
Top achievements
Rank 1
answered on 16 Apr 2013, 04:44 PM
...for those following the breadcrumbs, here is a telerik workaround to the column header/tooltip issue:
http://www.telerik.com/community/forums/wpf/gridview/exception-when-binding-the-tootip-of-the-headers.aspx
http://www.telerik.com/community/forums/wpf/gridview/exception-when-binding-the-tootip-of-the-headers.aspx
0
For those, still looking for solution:
<telerik:RadGridView Name="radGridViewHeaderCellTooltip" ItemsSource="{Binding}"> <telerik:RadGridView.Resources> <!-- you can remove BasedOn if you don't use implicit styles --> <Style TargetType ="{x:Type telerik:GridViewHeaderCell}" BasedOn="{StaticResource {x:Type telerik:GridViewHeaderCell}}"> <Setter Property="ToolTip" Value="{Binding Column.(ToolTipService.ToolTip), RelativeSource={RelativeSource Self}}"/> </Style> </telerik:RadGridView.Resources> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Property1}" Header="Property1" ToolTip="Property 1 Tooltip" /> <telerik:GridViewDataColumn DataMemberBinding="{Binding Property2}" Header="Property2" ToolTip="Property 2 Tooltip" /> </telerik:RadGridView.Columns></telerik:RadGridView>2