Hi,
I need to provide a tooltip on the datgrid coulmn.
Data in the Grid column is in Image format.
ToolTip should change on the basis of Image.
if Image1 , toolTip=A
Image2 , toolTip=B
Image3 , toolTip=C
Tooltip is in string format.
Please help on this.
I need to provide a tooltip on the datgrid coulmn.
Data in the Grid column is in Image format.
ToolTip should change on the basis of Image.
if Image1 , toolTip=A
Image2 , toolTip=B
Image3 , toolTip=C
Tooltip is in string format.
Please help on this.
3 Answers, 1 is accepted
0
Accepted
Hi Rahul,
Following up your requirements, the Name property in the definition of the ToolTip will correspond to the property in your Business Object holding the values - A, B, C.
However, if this does not correspond to your particular needs, I would need a bit more details about the definition of the RadGridView and you Business Object.
All the best,
Maya
the Telerik team
A possible way for adding a ToolTip to a single column is:
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}">
<
telerik:GridViewDataColumn.CellTemplate>
<
DataTemplate
>
<
TextBlock
Text
=
"{Binding Name}"
ToolTipService.ToolTip
=
"{Binding Name}"
/>
</
DataTemplate>
</
telerik:GridViewDataColumn.CellTemplate>
</
telerik:GridViewDataColumn
>
Following up your requirements, the Name property in the definition of the ToolTip will correspond to the property in your Business Object holding the values - A, B, C.
However, if this does not correspond to your particular needs, I would need a bit more details about the definition of the RadGridView and you Business Object.
All the best,
Maya
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0

Alex
Top achievements
Rank 1
answered on 16 Jun 2011, 04:51 PM
Hi,
I've followed the pattern : http://www.telerik.com/help/wpf/gridview-how-to-create-row-tooltip.html for setting row-level tooltip. It worked with version 2009.2.0813.35 but it nomore works in 2011.1.0315.35, in fact it works when I open the control with data in it, but if I edit the product name column, then the tooltip is nomore shown. I often need to refresh the grid by sorting it to make it work. Look at this code, it's pretty simple:
<Grid x:Name="grdGrille">
<Grid.Resources>
<DataTemplate x:Key="MyToolTip">
<TextBlock Text="{Binding ProductName}" />
</DataTemplate>
</Grid.Resources>
<telerik:RadGridView x:Name="RadGridView1" AutoGenerateColumns="False" RowLoaded="RadGridView1_RowLoaded" >
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding ProductName}" Header="Product" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</Grid>
What's wrong ?
Thanks!
I've followed the pattern : http://www.telerik.com/help/wpf/gridview-how-to-create-row-tooltip.html for setting row-level tooltip. It worked with version 2009.2.0813.35 but it nomore works in 2011.1.0315.35, in fact it works when I open the control with data in it, but if I edit the product name column, then the tooltip is nomore shown. I often need to refresh the grid by sorting it to make it work. Look at this code, it's pretty simple:
<Grid x:Name="grdGrille">
<Grid.Resources>
<DataTemplate x:Key="MyToolTip">
<TextBlock Text="{Binding ProductName}" />
</DataTemplate>
</Grid.Resources>
<telerik:RadGridView x:Name="RadGridView1" AutoGenerateColumns="False" RowLoaded="RadGridView1_RowLoaded" >
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn DataMemberBinding="{Binding ProductName}" Header="Product" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
</Grid>
What's wrong ?
Thanks!
0
Hello Alex,
Maya
the Telerik team
You will have to handle the CellEditEnded event and define the ToolTip there as well. It should be similar to the approach in the article you mentioned. However, instead of setting it to the row, you may try setting it to the cell directly. Another thing that you may try is to follow the idea illustrated in this forum thread. Whether it would be appropriate depends entirely on the ToolTip that you want to display.
Maya
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