We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to show the tooltip for filtertogglebutton in SfDataGrid - From 178541

It is very similar to first one. I want to add tooltip to these 2 filtertogglebutton. And each one must be different. 

1 Reply

VS Vijayarasan Sivanandham Syncfusion Team December 9, 2022 11:54 PM UTC

Hi Kivanc Yilmaz,

Your requirement to show the different tooltips for the filter toggle button in SfDataGrid by overriding the FilterToggleButton and customizing the ToolTipOpening event. Refer to the below code snippet,

XAML code snippet:

<!-- Customize the style of Filter icon -->

<Style  TargetType="{x:Type syncfusion:FilterToggleButton}">     

     <Setter Property="Foreground" Value="Red" />

     <!--Here defines the tooltip to trigger ToolTipOpening event for FilterToggleButton-->

     <Setter Property="ToolTip" Value=""  />

     <!--Event subscription for toolTip showing-->

     <EventSetter Event="ToolTipOpening"  Handler="OnFilterToggleButtonToolTipOpening" />     


C# code snippet:

//Event customization

private void OnFilterToggleButtonToolTipOpening(object sender, ToolTipEventArgs e)


    //Here get the FilterToogleButton

    var filterToggleButton = e.Source as FilterToggleButton;


    if (filterToggleButton != null)


        //Here get the mouse hovering GridColumn

        var column = filterToggleButton.DataContext as GridColumn;


        if (column != null)


            //Here customize the ToolTip based on different column

            if (column.MappingName == "OrderID")


                filterToggleButton.ToolTip = "OrderID ToolTip";


            else if (column.MappingName == "CustomerID")


                filterToggleButton.ToolTip = "CustomerID ToolTip";



                //Here handle the ToolTip for other columns

                e.Handled = true;




UG Link:


KB Link: https://www.syncfusion.com/kb/2482/how-to-change-the-filtertogglebutton-color-while-filtering

Find the sample in the attachment.


Vijayarasan S

If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.

Attachment: Sample_db34486c.zip

Live Chat Icon For mobile
Up arrow icon