Extjs Tooltip

How to initialize QuickTipManager?

Ext.tip.QuickTipManager.init();

How to add tooltip to a grid cell?

Ext.define('huo.view.DocumentListGridPanel', {
    extend: 'Ext.grid.Panel',     
    alias : 'widget.documentListGridPanel',     

    [...]
    <!-- layout: 'fit',-->
    height: '100%',

    columns: [
    [...]
    {
        text     : 'Annotation',
        flex:1,
        sortable : true,
        dataIndex: 'annotation',
        renderer : function(value, metadata, record) {
          if(record.get('annotation') === ''){
             return record.get('annotation');
          }else{
             myToolTipText = "<b>Annotation</b>";
             myToolTipText = myToolTipText + "<br/>"+ record.get('annotation');
             metadata.tdAttr = 'data-qtip="' + myToolTipText + '"';
             return value;
          }
        }
    }
    ],
    viewConfig: {
    }
});

The above example use the renderer function.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License