Articles in this section
Category / Section

How to show tooltip for the disabled cell in WPF DataGrid (SfDataGrid)?

1 min read

WPF DataGrid (SfDataGrid) allows you to show the ToolTip through OnMouseEnter event. But the tooltip will not be displayed for disabled cells in DataGrid. You can show the Tooltip for disabled cells by setting the values to ToolTipTemplate of the column.

<Style TargetType="syncfusion:GridCell"
        x:Key="KeyGridCellColumnCellStyle" >
    <Setter Property="IsEnabled" Value="False" />
    <Setter Property="ToolTip">
        <Setter.Value>
            <TextBlock Text="{Binding ShipCountry}" ToolTipService.IsEnabled="True" 
                                ToolTipService.ShowOnDisabled="True"/>
        </Setter.Value>
    </Setter>
    <Setter Property="ToolTipService.IsEnabled" Value="True" />
    <Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
</Style><syncfusion:GridTextColumn HeaderText="Ship Country" MappingName="ShipCountry" 
                        CellStyle="{StaticResource KeyGridCellColumnCellStyle}"  ShowToolTip="true">

Image shows the disabled cell tooltip

View WPF DataGrid Tooltip Demo in GitHub.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied