Unanswered: Grid Panel Listener - Retrieving Data from an Object
Unanswered: Grid Panel Listener - Retrieving Data from an Object
Hey Community,
Guys, I'm quite new to extJS and I would like your help.
I have this Grid.Panel with listeners, I don't know if i got it right. Anyway, I got it to print out its properties but I cant get the data. Here is what the console printed out.
dockedItems: [{
xtype: 'toolbar',
dock: 'top',
items:[{
text: '<img src="../static/images/refresh.gif" title="xyz">',
enableToggle: true,
iconCls: 'refresh', //nice refresh icon
listeners: {
toggle: function (button, pressed) {
var grid = button.up('grid');
if (!Ext.isDefined(grid.refreshTask)) { //check if the task is already created
grid.refreshTask = runner.newTask({ //create task
run: function () { getdata(); },
interval: 30000
});
}
if (pressed) { //toggle between start and stop
grid.refreshTask.start();
} else {
grid.refreshTask.stop();
}
}
}
}]
I want to add tooltip on image its done but iconCls: 'refresh', take some spece after image image show when I remove " iconCls: 'refresh', " its not show tooltip text.
don't use text property to define icon.
you should define icon as background-image in CSS class that you add in iconCls.
to add tooltip simply add tooltip property to the button you're creating and call Ext.tip.QuickTipManager.init(); when initializing your application to enable tooltips