WPF Version: .NET 3.5
OS: Windows 7
Telerik Product Version: WPF 2010 Q1
Programming Language: C#
Having an odd problem with tool tips not displaying on GridViews throughout our application. More or less, the tool tips are assigned in each column, but are only visible on editable cells when they are active. Has anyone ran into this behavior before?
OS: Windows 7
Telerik Product Version: WPF 2010 Q1
Programming Language: C#
Having an odd problem with tool tips not displaying on GridViews throughout our application. More or less, the tool tips are assigned in each column, but are only visible on editable cells when they are active. Has anyone ran into this behavior before?
7 Answers, 1 is accepted
0
Hi,
Vlad
the Telerik team
Can you post more info how exactly you've assigned these tooltips?
Best wishes,Vlad
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0

Phil
Top achievements
Rank 1
answered on 24 Jan 2011, 05:19 PM
Thanks for making me look at that. I realized I was assigning the tooltips in the cell edit template so that would explain the behavior. I have moved all of the tool tips into the actual columns' tags like below but now they don't appear at all.
<
telerik:GridViewDataColumn
Header
=
"X/Easting"
ToolTip
=
"Enter X-coordinate/Easting values for each well (required for spatial analysis)- map units set in project info."
DataMemberBinding
=
"{Binding XCoordinates, Mode=TwoWay}"
TextAlignment
=
"Right"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding XCoordinates}"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerik:RadNumericUpDown
Minimum
=
"0"
ValueFormat
=
"Numeric"
Value
=
"{Binding XCoordinates, Mode=TwoWay}"
ShowButtons
=
"False"
>
<
telerik:RadNumericUpDown.NumberFormatInfo
>
<
n:NumberFormatInfo
NumberDecimalDigits
=
"3"
/>
</
telerik:RadNumericUpDown.NumberFormatInfo
>
</
telerik:RadNumericUpDown
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
0
Hello Phil,
In case you want the ToolTip to be displayed in edit mode too, you may set the ToolTip for the CellEditTemplate also.
Regards,
Maya
the Telerik team
You need to define the CellTemplate and set the ToolTip there. For example:
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Name, Mode=TwoWay}"
ToolTip
=
"Enter X-coordinate/Easting values for each well (required for spatial analysis)- map units set in project info."
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
In case you want the ToolTip to be displayed in edit mode too, you may set the ToolTip for the CellEditTemplate also.
Regards,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0

Phil
Top achievements
Rank 1
answered on 26 Jan 2011, 06:21 PM
What is the best method for displaying tooltips on GridViewComboBox columns?
0
Hello Phil,
If you want to apply a particular ToolTip only for GridViewComboBoxColumn, you may define an explicit style and set it to that particular column:
Still, you may also use the approach above and define the CellTemplate as a RadComboBox and set the ToolTip directly to it.
Kind regards,
Maya
the Telerik team
In case you want to display one and the same ToolTip for all the columns, you may just define an implicit style targeting GridViewCell:
<
Window.Resources
>
<
Style
TargetType
=
"telerik:GridViewCell"
>
<
Setter
Property
=
"ToolTip"
Value
=
"MyToolTipMessage"
/>
</
Style
>
</
Window.Resources
>
If you want to apply a particular ToolTip only for GridViewComboBoxColumn, you may define an explicit style and set it to that particular column:
<
Window.Resources
>
<
Style
x:Key
=
"MyStyle"
TargetType
=
"telerik:GridViewCell"
>
<
Setter
Property
=
"ToolTip"
Value
=
"MyToolTipMessage"
/>
</
Style
>
</
Window.Resources
>
<
telerik:GridViewComboBoxColumn
DataMemberBinding
=
"{Binding CountryID}"
SelectedValueMemberPath
=
"ID"
CellStyle
=
"{StaticResource MyStyle}"
ItemsSource
=
"{Binding Countries, Source={StaticResource Country}}"
DisplayMemberPath
=
"Name"
>
Still, you may also use the approach above and define the CellTemplate as a RadComboBox and set the ToolTip directly to it.
Kind regards,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0

Phil
Top achievements
Rank 1
answered on 27 Jan 2011, 04:55 PM
Hmm.... very confused as to why you can't just set the tooltip value per column. I have a style defined for my window for all tooltips:
Is there no way to set each ComboBoxColumns tooltips with this style applied?
<
Window.Resources
>
<
Style
TargetType
=
"{x:Type ToolTip}"
>
<
Setter
Property
=
"Placement"
Value
=
"Bottom"
></
Setter
>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
></
Setter
>
<
Setter
Property
=
"BorderThickness"
Value
=
"0"
></
Setter
>
<
Setter
Property
=
"HasDropShadow"
Value
=
"False"
></
Setter
>
<
Setter
Property
=
"Template"
>
<
Setter.Value
>
<
ControlTemplate
>
<
StackPanel
Orientation
=
"Vertical"
>
<
Image
Stretch
=
"Fill"
Source
=
"/LTMO.WPF;component/images/tooltip_arrow.png"
Width
=
"20"
Height
=
"7"
Margin
=
"15 0 0 0"
HorizontalAlignment
=
"Left"
/>
<
Border
Background
=
"#FF555555"
Padding
=
"8"
CornerRadius
=
"6"
>
<
TextBlock
Background
=
"White"
Padding
=
"4 2 4 2"
Foreground
=
"#FF333333"
FontSize
=
"12"
TextWrapping
=
"Wrap"
MaxWidth
=
"300"
Height
=
"Auto"
Text
=
"{TemplateBinding ContentPresenter.Content}"
/>
</
Border
>
</
StackPanel
>
</
ControlTemplate
>
</
Setter.Value
>
</
Setter
>
</
Style
>
</
Window.Resources
>
Is there no way to set each ComboBoxColumns tooltips with this style applied?
0
Hi Phil,
After you define this CellStyle for the GridViewComboBoxColumn, it will have a ToolTip with the Style you want.
Best wishes,
Maya
the Telerik team
The columns do expose a ToolTip property, but generally it is inherited form the Framework and have no actual function. If you want to define a ToolTip to your GridViewComboBoxColumn with the Style provided above, you may just leave in the way it is right now and set the ToolTip as mentioned previously:
<
Style
x:Key
=
"MyStyle"
TargetType
=
"telerik:GridViewCell"
>
<
Setter
Property
=
"ToolTip"
Value
=
"MyToolTipMessage"
/>
</
Style
>
After you define this CellStyle for the GridViewComboBoxColumn, it will have a ToolTip with the Style you want.
Best wishes,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>