View Full Version : How to show tooltip as popup content information of current record when mouse over

28 Nov 2011, 8:42 AM

I view list record on grid. I have 3 icon on actions column: Edit, View, Delete. I have completed for each action by handler when click on each icon. However, my end-users want only mouse over on "View" icon, we must view detail record as pop-up form.

I tried set a format information of record by HTML and set to tooltip of action but it is not work.

Do you have any idea, please help me!

28 Nov 2011, 9:20 AM

xtype: 'actioncolumn',
width: 50,
items: [{
icon : '../shared/icons/fam/delete.gif', // Use a URL in the icon config
tooltip: 'Sell stock',
handler: function(grid, rowIndex, colIndex) {
var rec = store.getAt(rowIndex);
alert("Sell " + rec.get('company'));
}, {
getClass: function(v, meta, rec) { // Or return a class from a function
if (rec.get('change') < 0) {
this.items[1].tooltip = 'Hold stock';
return 'alert-col';
} else {
this.items[1].tooltip = 'Buy stock';
return 'buy-col';
handler: function(grid, rowIndex, colIndex) {
var rec = store.getAt(rowIndex);
alert((rec.get('change') < 0 ? "Hold " : "Buy ") + rec.get('company'));

28 Nov 2011, 5:36 PM
Thanks Tobiu,
I want set tooltip as: tooltip: Ext.StringFormat('<div class="col-one">ID</div><div class="col-two">4224</div><div class="col-one">Program</div><div class="col-two">Nurs</div>')
I want view information of current record with format as popup form when mouse hover to icon "view".

Do you have any idea?