Grid Column Sort icons should have tooltip

1 Answer 87 Views
Grid
ashutosh
Top achievements
Rank 1
Iron
Veteran
ashutosh asked on 09 Oct 2021, 02:02 PM

Hi Team,

 

How can we add tooltip to the sort icon of the grid column header.

 

thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay
Telerik team
answered on 13 Oct 2021, 12:17 PM

Hello Ashutosh,

If you wish to implement the Kendo UI Tooltip you can use the following:

var tooltip = $("th").kendoTooltip({
        filter: ".k-i-sort-asc-sm, .k-i-sort-desc-sm",
        position: "right",
        content: "Sort"
      }).data("kendoTooltip");

If you wish to use the HTML tooltip you need to append "title" attribute to the sort icon:

        sort: function(e) {
          var headers = Array.from($("th"))
          headers.forEach(function(el) {
            setTimeout(function() {
              $(el).find("a.k-link>.k-icon").prop("title", "Sort")
            })
          })
        }

Let me know if you have any questions.

Regards,
Nikolay
Progress Telerik

Remote troubleshooting is now easier with Telerik Fiddler Jam. Get the full context to end-users' issues in just three steps! Start your trial here - https://www.telerik.com/fiddler-jam.
Tags
Grid
Asked by
ashutosh
Top achievements
Rank 1
Iron
Veteran
Answers by
Nikolay
Telerik team
Share this question
or