Home > DeveloperSection > Forums > WPF dataGrid tool tip service
marcel ethan
marcel ethan

Total Post:105

Posted on    September-03-2013 8:18 AM


 1 Reply(s)
 3044  View(s)
Rate this:

I have a DataGrid and I would like to be able to display data from what ever cell the mouse is over using the ToolTip service. Can someone tell me what I am doing wrong. Thanks a lot.

Here is my DataGrid:

<DataGrid Name="dgData" CanUserAddRows="False"

                        Style="{DynamicResource DataGridRow}"



                        EnableColumnVirtualization="True" />

And here is what I have tried, but my app wont load the DataGrid when I add this.

<Style TargetType="{x:Type DataGrid}">

    <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Value}" />


Sumit Kesarwani

Total Post:378

Posted on    September-03-2013 8:23 AM

Hi Marcel,

Please add this in your resources

<Style TargetType="{x:Type DataGridCell}">

    <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Mode=Self}, Path=Content.Text}" />


Don't want to miss updates? Please click the below button!

Follow MindStick