PDA

View Full Version : overCls on Grid or Editor Grid Row?



davisty
4 Jun 2011, 10:09 AM
Hello,

Im having a heck of a time with overCls in the (editor)gridrow. It doesnt seem to recognize the css, or something.

Im trying to mouseover on the entire row. Im just using the normal config option. Does anyone have an example or something ...or am I wrong about how this works?

Thanx

skirtle
5 Jun 2011, 4:47 PM
I suspect you mean rowOverCls rather than overCls? For a normal grid it is pretty easy to get it to work, however there are problems using it with an editorgrid. If you take a look at the docs for Ext.grid.GridPanel you'll see a config option called trackMouseOver and it mentions in the docs that it is false for an editorgrid. Further, it doesn't appear in the editorgrid docs. The code comment states 'causes very odd FF errors', which sounds pretty ominous but isn't explained further. If you still want to press on with using rowOverCls, here's an example:


new Ext.grid.EditorGridPanel({
height: 300,
renderTo: Ext.getBody(),
trackMouseOver: true,
width: 300,
columns: [
{dataIndex: 'name', header: 'Name', editor: new Ext.form.TextField()},
{dataIndex: 'shape', header: 'Shape'}
],
store: new Ext.data.ArrayStore({
fields: ['name', 'shape'],
data: [
['Bob', 'square'],
['Tom', 'circle'],
['Jon', 'triangle']
]
}),
viewConfig: {
rowOverCls: 'custom'
}
});

davisty
7 Jun 2011, 5:30 AM
coolBeans,

Does the overCls work at all. I couldnt get it to. Or is it not used how I was trying to use it ...

Im getting better at his stuff, not there yet. But yalls help has made it much easier for me ...

Thanx