PDA

View Full Version : Problem with mouse over listener when button is in grid



paweluz
28 Mar 2011, 2:03 AM
Hi

I have created the very simple grid and I added in one column a button. It is done in the simplest possible way. I found that one in Forum. It looks like that:


{
header: "Button",
dataIndex: 'button',
width: 130,
renderer: renderBtn
}

function renderBtn(val, p, record) {
var contentId = Ext.id();
createGridButton.defer(1, this, [val, contentId, record]);
return('<div id="' + contentId + '"></div>');
}
function createGridButton(value, contentid, record) {
new Ext.Button({text: value, handler : function(btn, e) {
alert("record data="+record.data);
}}).render(document.body, contentid);
}


I got 2 problems with that solutions:
1. When I do very fast hover over rows and I move over buttons as well sometimes the style
of already hovered row does not change. Example when I do hover from bottom of the grid to top looks like that:
http://i52.tinypic.com/14jc7k3.png
2. I would like to have the same stuff done on row mouse over listener and on button over listener. I guess
this one would be done if first problem would be solved, but actually I do not know.

Can anyone please help me on that?
thanks

Regards,
Pawel

paweluz
28 Mar 2011, 10:13 PM
Noone knows how can I improve or fix that? Any help would be great...