Tooltip/Title for header columns

Posted by: casablanca on 9 September 2017, 8:18 am EST

  • Posted 9 September 2017, 8:18 am EST

    Hello,

    is there a way to have mouse over tooltip in the grid header (wijgrid). How can I do this only for the header columns in MVC? I need an example please which works.

    Thanks
  • Replied 9 September 2017, 8:18 am EST

    Hello,

    You can use WijToolTip to display a tooltip when the mouse is hovered over the WijGrid columns. Here is the sample code for the same:

    rendered: function () {
    $(".wijmo-wijgrid-headerrow th").each(function (index) {
    var ele = $(this);
    $(this).wijtooltip({
    content: $(this).find(".wijmo-wijgrid-headertext").text(),
    position: { my: "center bottom", at: "center top", offset: "50 0" }
    });
    });
    }


    Kindly refer to the attached sample which implements the same. Hope it helps.

    Thanks,
    Manpreet Kaur
    2015/01/GridHeader_ToolTip.zip
  • Replied 9 September 2017, 8:18 am EST

    Hello Manpreet ,

    thnaks a lot. It workls perfectly.
    As you know, I have a grid with five freezed columns on the left side. I would like the tool tips only for the unfreezed columns with the custom text. I have for example an array as following:


    var myTooltipTextForUnfreezedColumns = ["Text1", "Text2", "Text3", "Text4", "Text5", "Text5", "Text6", "Text7" ];


    I have tried to control my tooltips with the index-paramaeter, but I can't disable the tooltips of the freezed columns.

    Thanks
  • Replied 9 September 2017, 8:18 am EST

    Hello,

    You can use the follwoing code to display tooltips with custom text, only for the unfreezed columns:


    $(".wijmo-wijgrid-split-area-ne").find(".wijmo-wijgrid-table").find(".wijmo-wijgrid-headerrow th").each(function (index)
    {
    var ele = $(this);
    $(this).wijtooltip({
    content: myTooltipTextForUnfreezedColumns[index],
    position: { my: "center bottom", at: "center top", offset: "50 0" }
    });
    });


    Kindly refer to the attached sample which implements the same. Hope it helps.

    Thanks,
    Manpreet Kaur
    2015/02/GridHeader_ToolTip_Frozen.zip
  • Marked as Answer

    Replied 9 September 2017, 8:18 am EST

    Hello Manpreet ,

    thank you very much.

    Regards.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels