PDA

View Full Version : [FIXED-652] groupmousedown event doesn't fire



LambyPie
24 Feb 2010, 7:45 AM
Does the new "groupmousedown" event on a GridPanel with a grouping view work? According to the docs it should fire when a group header is clicked but it doesn't for me, the following code demonstrates this:



Ext.onReady(function()
{
// create a reader
var reader = new Ext.data.JsonReader(
{
fields:
[
{name:'type'},
{name:'colour'},
{name:'price'}
]
});

// create a grouping store
var store = new Ext.data.GroupingStore(
{
reader:reader,
data:
[
{type:'car', colour:'red', price:'10'},
{type:'car', colour:'green', price:'10'},
{type:'car', colour:'blue', price:'10'},
{type:'bike', colour:'red', price:'10'},
{type:'bike', colour:'green', price:'10'},
{type:'bike', colour:'blue', price:'10'}
],
sortInfo:{field:'type', direction:'ASC'},
groupField:'type'
});

// create a grid
var grid = new Ext.grid.GridPanel(
{
store:store,
columns:
[
{header:'Type', dataIndex:'type'},
{header:'Colour', dataIndex:'colour'},
{header:'Price', dataIndex:'price'}
],
view:new Ext.grid.GroupingView(),
autoHeight:true,
listeners:
{
groupmousedown:function() {alert("mousedown");}
},

renderTo:Ext.getBody()
});
});


if you run this and click on one of the group header lines (e.g. "- Type:car") you don't get the alert....

I would really like to use this event to do some work before a group is expanded/collapsed. There is the "groupclick" event but this only fires after the group has already been expanded/collapsed.

evant
5 Apr 2010, 8:34 AM
Fixed in SVN, rev 6454.