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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Tooltip for header

Thread ID:

Created:

Updated:

Platform:

Replies:

144654 May 16,2019 01:39 AM UTC May 16,2019 04:40 AM UTC Vue 1
loading
Tags: Data Grid
William Morgenweck
Asked On May 16, 2019 01:39 AM UTC

Is it possible to have tooltip for a Grid header?  I see where you can do the querycellinfo but that really is not a clean solution when you want to explain what the column header means.  If I am using # as my header text because it needs to be a very small width column it would be very helpful to have a tooptip associated with the #

Pavithra Subramaniyam [Syncfusion]
Replied On May 16, 2019 04:40 AM UTC

Hi William, 

Thanks for contacting Syncfusion support. 

You can render the custom tooltip to the Grid header by using the “headerCellInfo” event. Please refer to the below code example, documentation link and sample link for more information. 

[App.vue] 
<template> 
  <div id="app"> 
    <ejs-grid ref="grid" :dataSource="data" :headerCellInfo="headerCellInfoEvent " height="315px"> 
      <e-columns> 
        <e-column field="OrderID" headerText="Order ID" textAlign="Right" width="90"></e-column> 
        <e-column field="CustomerID" headerText="Customer ID" width="120"></e-column> 
        <e-column field="Freight" headerText="Freight" textAlign="Right" format="C2" width="90"></e-column> 
        <e-column field="ShipName" headerText="Ship Name" width="120"></e-column> 
      </e-columns> 
    </ejs-grid> 
  </div> 
</template> 

<script> 
import Vue from "vue"; 
import { GridPlugin } from "@syncfusion/ej2-vue-grids"; 
import { Tooltip } from "@syncfusion/ej2-popups"; 
import { data } from "./datasource.js"; 
Vue.use(GridPlugin); 

export default {   
  methods: { 
    headerCellInfoEvent: function(args) { 
      new Tooltip( 
        { 
          content: args.cell.column.headerText 
        }, 
        args.node 
      ); 
    } 
 
}; 
</script> 

 

Sample               : https://codesandbox.io/s/ndt0u 

Regards, 
Pavithra S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon