I am trying to do a mouse over on all the items in the grid. How do I go about. I am pretty new to this stuff. Would be great if someone can explain by an example :)
Asked
Active
Viewed 2,791 times
0
-
Do you want the mouse over event to trigger on _each_ item or just once when the mouse enters the area of the grid that contains the items? – egerardus Aug 03 '12 at 22:58
-
I want to trigger the event on each item separately.. – ManJan Aug 04 '12 at 23:06
2 Answers
2
You can attach an event listener on your gridpanel's itemmouseenter
event by using the gridpanel's listeners
config like this:
Ext.create('Ext.grid.Panel', {
//... other grid configs
listeners: {
itemmouseenter: function(gridview, record) {
console.log('Mouse over on record:');
console.log(record);
}
}
});
You should get familiar with looking up things in the ExtJS API to find out what ExtJS classes have which configurations, methods and events that you can use. For example that itemmouseenter
event can be found here in the API.

egerardus
- 11,316
- 12
- 80
- 123
0
Look at this documentation. http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.Panel Under Events you have various events like containermouseover and containermouseout which fires when you enter grid panel or leave grid panel. There are other events like itemmouseenter and itemmouseleave. Check this so link Extjs 4 Grid hover effect.