1. #1
    Sencha User
    Join Date
    Jun 2008
    Posts
    229
    Vote Rating
    1
    sseema is on a distinguished road

      0  

    Default Hi tooltip problem

    Hi tooltip problem


    Hi,

    I want tooltip on grid rows.When I place mouse on row it needs to display the tooltip.
    Please give me an idea.If any body have code please give me.

    I appreciate any help.

    Thank You

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    97
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Example:
    Code:
    var tip = new Ext.Tip({
    	title: 'Tip'
    });
    var grid = new Ext.grid.GridPanel({
    	store: new Ext.data.SimpleStore({
    		fields: ['value', 'tip'],
    		data: [
    			[1, 'One'],
    			[2, 'Two'],
    			[3, 'Three']
    		]
    	}),
    	columns: [
    		{dataIndex: 'value', header: 'Value'}
    	],
    	listeners: {
    		mouseover: function(e, t){
    			var row = grid.getView().findRow(t);
    			if(row){
    				var record = grid.getStore().getAt(row.rowIndex);
    				if(tip.rendered){
    					tip.body.update(record.get('tip'));
    				}else{
    					tip.html = record.get('tip');
    				}
    				tip.showBy(row);
    			}
    		},
    		mouseout: function(e, t){
    			var row = grid.getView().findRow(t);
    			if(row && row != grid.getView().findRow(e.getRelatedTarget())){
    				tip.hide();
    			}
    		}
    	}
    });

Thread Participants: 1