Because Gridpanel cell in the text too many times, are replaced by the ellipsis, I want to achieve the function of title, after repeated experiments, finally done! Directly on the code:
Me.on (' Itemmouseenter ',function(view, record, item, index, E, eopts) {if(View.tip = =NULL{//This judgment is important, you cannot create a ToolTip every time, or there will be a problem. View.tip= Ext.create (' Ext.tip.ToolTip ', { //The overall target element.Target:view.el,//Each of the grid row causes its own separate show and hide.Delegate:view.itemSelector,//moving within the row should not hide the tip. //Trackmouse:false, //Render immediately so, Tip.body can is referenced prior to the first show.renderTo:Ext.getBody ()}); }; varGridcolums =View.getgridcolumns (); varColumn =Gridcolums[e.gettarget (view.cellselector). CellIndex]; View.el.clean (); View.tip.update (Record.data[column.dataindex]); });
Explanation: The main code is intercepted here, in practice, is to listen to your table Itemmouseenter This event on the line!
Effect!
ExtJS 4.2 implements a Gridpanel mouse hover cell to display cell contents in a way that prompts information.