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

[Solved] Custom Grid View Cell Tooltip

1 Answer 136 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nick McAlonan
Top achievements
Rank 1
Nick McAlonan asked on 15 Feb 2010, 02:31 PM
I was wondering whether anyone might be able to help with my problem.

I have a grid which is bound to a collection of objects, I require to load a custom tooltip which will eventually contain a graph when the user hovers over a certain cell. 

I can get the tooltip to display as expected but cant get the data binding correct, it always binds to the last rows data even when I hover over the first item.

To set the tool tip I use,

<controls:RadGridView.Columns>
  <controls:GridViewDataColumn Header="Value" DataMemberBinding="{Binding Value}" ToolTipTemplate="{StaticResource GraphPreview}"/>
</controls:RadGridView.Columns>

And the tooltip is declared in the Grid Resources,

<DataTemplate x:Key="GraphPreview" >
                                        <ToolTip Width="300" Height="150">
                                            <ToolTip.Template>
                                                <ControlTemplate TargetType="ToolTip">
                                                    <Border Background="{StaticResource BlackGradient}"
                                                            BorderBrush="{StaticResource DarkBlue}"
                                                            BorderThickness="1"
                                                            CornerRadius="10">
                                                        <ContentPresenter Margin="10" Content="{TemplateBinding Content}" />
                                                    </Border>
                                                </ControlTemplate>
                                            </ToolTip.Template>
                                            
                                            <StackPanel Orientation="Vertical">
                                                <TextBlock Foreground="White" Text="{Binding Name}"/>
                                                <TextBlock Foreground="White" Text="{Binding Value}"/>
                                                <TextBlock Foreground="White" Text="{Binding UnitType}"/>
                                                <TextBlock Foreground="White" Text="{Binding SuperType}"/>
                                            </StackPanel>
                                                
                                        </ToolTip>
                                        
                                    </DataTemplate>

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 16 Feb 2010, 12:37 PM
Hi Nick McAlonan,

There was a known bug with the tooltip always showing data from the last row. To solve this please download a later version ( e.g. a later internal build ) .
Internal builds are available for download in your client.net account.


All the best,
Pavel Pavlov
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.
Tags
GridView
Asked by
Nick McAlonan
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or