Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / How to enable tooltip on Iggrid column Header.

How to enable tooltip on Iggrid column Header.

New Discussion
shrenath ss
shrenath ss asked on Jul 13, 2024 6:16 AM

Hi,

I have the tooltip displayed on the column  values. I need to apply the tooltips on column header text as well.

Could you please let me know with sample code how to enable the tooltip for the column headers.

Thanks,

Shrenath.

Sign In to post a reply

Replies

  • 0
    Vasya Kacheshmarova
    Vasya Kacheshmarova answered on Oct 17, 2019 10:40 AM

    Hello,

    Thank you for posting in our community.

    In order to add tooltip to the column header you should add "title" attribute to the "th" element of the column. Each "th" element has "id" attribute which has the following structure "<gridId>_<columnKey>" where <gridId> is the id of the grid and <columnKey> is the key of the column.

    Here is the example code:

    Code Snippet
    1. <script type="text/javascript">
    2. var adventureWorks = [{“ProductID”:1},{“ProductID”:2},{“ProductID”:3},{“ProductID”:4},{“ProductID”:5},{“ProductID”:6}];
    3.     $(window).load(function () {
    4.     $("#grid1").igGrid({
    5.         columns: [
    6.             { headerText: “Product ID”, key:“ProductID”, dataType:“number”, width: “100px”}
    7.         ],
    8.         autoGenerateColumns: false,
    9.         dataSource: adventureWorks
    10.     });
    11.     $("#grid1_ProductID").attr("title", "my custom title");
    12. });
    13. </script>

     
    Please let me know if you need any further assistance with this matter.

  • 0
    Talha Anwer
    Talha Anwer answered on Nov 18, 2022 5:12 PM

    It can be added to Grid Configuration as well, as in:

    1. <script type="text/javascript">
    2. var adventureWorks = [{“ProductID”:1},{“ProductID”:2},{“ProductID”:3},{“ProductID”:4},{“ProductID”:5},{“ProductID”:6}];
    3.     $(window).load(function () {
    4.     $("#grid1").igGrid({
    5.         columns: [
    6.             { headerText: “Product ID”, key:“ProductID”, dataType:“number”, width: “100px”}
    7.         ],
    8.         autoGenerateColumns: false,
    9.         dataSource: adventureWorks,
    10.         rendered: function() {$("#grid1_ProductID").attr("title", "my custom title");}
    11.     });
    12. });
    13. </script>
    • 0
      paras thackral
      paras thackral answered on Jul 13, 2024 6:16 AM

      To enable the tooltips with their default settings, just set the name property to “Tooltips”. The following code enables the default behavior of the igGrid Tooltips. In Javascript: $("#grid1").

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
shrenath ss
Favorites
0
Replies
3
Created On
Jul 13, 2024
Last Post
1 year, 7 months ago

Suggested Discussions

Created by

Created on

Jul 13, 2024 6:16 AM

Last activity on

Feb 20, 2026 11:52 AM