PDA

View Full Version : GroupingStore's load is not working



himan
25 May 2010, 3:24 AM
GRID:----

var grid = new xg.GridPanel({
store: store,
cm: new xg.ColumnModel({
defaults: {
width: 130,
sortable: true
},
columns: columnss
}),
tbar: new Ext.Toolbar({
id: 'myToolBar',
items:[
exportDataButton,
new Ext.Toolbar.Separator(),
chartButtonHandler,
new Ext.Toolbar.Separator(),
selectViewButton
]
}),
view: new Ext.grid.GroupingView({
forceFit:false,
groupTextTpl: '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Records" : "Record"]})'
}),
plugins: summary,
//columnLines: true,
frame:true,
width: 1250,
height: 480,
collapsible: true,
animCollapse: false,
title: gridTitle,
iconCls: 'icon-grid',
renderTo: document.body,
sm: selModel
});

STORE:----

var store = new Ext.data.GroupingStore({
reader: reader,
autoLoad: true,
data: xg.dummyData,
sortInfo:{field: 'warehouseCode', direction: "ASC"},
groupField:'departmentCode'
});

Ext.grid.dummayData=<%=data%>
NOW i m trying to do this:

store.on('load', function(str, record,option){
alert('load called');
});
but i m not getting the alert message i.e. 'load called'
can any ont tell me what is going wrong with me....