PDA

View Full Version : [CLOSED]Grid stripeRows



westy
14 Mar 2011, 8:07 AM
This doesn't appear to be working for me.

All tr's have the same class.



Ext.define('Altus.grid.GridPanel', {
extend: 'Ext.grid.GridPanel',
alias: ['widget.altus.gridpanel', 'widget.altus.grid'],

columnLines: true,

viewConfig: {
stripeRows: true // This doesn't appear to work :/
}
});


Am I doing something wrong?

Animal
14 Mar 2011, 8:23 AM
It's a config of GridPanel now.

westy
14 Mar 2011, 8:50 AM
Hi Animal,

Doesn't appear to be.

In example above, setting stripeRows: true, or config { stripeRows: true } has no effect as far as I can see.

Can't see it in Ext.grid.GridPanel either.

Cheers,
Westy

Animal
14 Mar 2011, 10:57 AM
Hmm.. In the examples that I am working on it works...




var firstGrid = new Ext.grid.GridPanel({
viewConfig: {
plugins: {
ptype: 'gridviewdd',
dragGroup: 'firstGridDDGroup',
dropGroup: 'secondGridDDGroup'
},
listeners: {
drop: function(node, data, dropRec, dropPosition) {
var dropOn = dropRec ? ' ' + dropPosition + ' ' + dropRec.get('name') : ' on empty view';
Ext.example.msg("Drag from right to left", 'Dropped ' + data.records[0].get('name') + dropOn);
}
}
},
store : firstGridStore,
headers : headers,
enableDragDrop : true,
stripeRows : true,
autoExpandColumn : 'name',
title : 'First Grid',
margins : '0 2 0 0'
});


resulting in

http://f.cl.ly/items/000g103a0i2a1G3q0m01/Screen%20shot%202011-03-14%20at%2018.44.26.png

westy
15 Mar 2011, 2:41 AM
Hmm, well I can't get it working...

When I looked at your post last night the linked image had the stripes, now the embedded image doesn't...

evant
20 Mar 2011, 7:43 PM
stripeRows is on the viewConfig, should be working as of PR5.

westy
21 Mar 2011, 6:37 AM
Yeah, works now, thanks.

The default $grid-row-cell-alt-background is pretty much indistinguishable from white though.
Have overridden with: $grid-row-cell-alt-background: lighten(gray, 45.0); for now...

Obviously there's probably another variable that should be used instead of gray, but will leave that up to those with knowledge of how the theming is meant to work :)

Cheers,
Westy