<br><font size=2 face="sans-serif">Robert, I never used it with a geoext
FeatureStore but with a ext GroupingStore, like this</font>
<br><font size=2 face="sans-serif">The store</font>
<br><font size=2 face="sans-serif">store = new Ext.data.GroupingStore({</font>
<br><font size=2 face="sans-serif">reader: new Ext.data.JsonReader({fields:['semcdc',
'prevalence', 'incidence']}),</font>
<br><font size=2 face="sans-serif">url: "extJsChart.php",</font>
<br><font size=2 face="sans-serif">autoLoad: true,</font>
<br><font size=2 face="sans-serif">sortInfo: {field: 'semcdc', direction:
'DESC'},</font>
<br><font size=2 face="sans-serif">groupOnSort: true,</font>
<br><font size=2 face="sans-serif">remoteGroup: false,</font>
<br><font size=2 face="sans-serif">groupField: 'semcdc'</font>
<br><font size=2 face="sans-serif">});</font>
<br>
<br><font size=2 face="sans-serif">I think you need to add some parameters
to the GroupingView.</font>
<br><font size=2 face="sans-serif">view: new Ext.grid.GroupingView({</font>
<br><font size=2 face="sans-serif">
forceFit: true,</font>
<br><font size=2 face="sans-serif"> hideGroupedColumn:
true,</font>
<br><font size=2 face="sans-serif">
enableNoGroups: true, // This one is required think!</font>
<br><font size=2 face="sans-serif">
startCollapsed: true</font>
<br><font size=2 face="sans-serif">
})<br>
</font>
<br><font size=3>Hope this help!</font>
<br><font size=3>Steve</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Robert Buckley <robertdbuckley@yahoo.com>@geoext.org</b>
</font>
<br><font size=1 face="sans-serif">Envoyé par : users-bounces@geoext.org</font>
<p><font size=1 face="sans-serif">2010-12-08 08:54</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">users@geoext.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">[Users] Can´t create grouping store</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><font size=1 face="Arial">Hi,<br>
<br>
I am trying to create a grouping store for a grid reading data from a shapefile.<br>
Reading from a tutorial it should be easy to adapt the grid by entering
the following configs...<br>
<br>
<br>
sortInfo and groupField...to the store<br>
<br>
and <br>
<br>
view to the grid<br>
<br>
<br>
however I get the error..."this.grid.store.getGroupState is not a
function"<br>
<br>
Any help would be most appreciated. I am looking to provide a grid which
groups and creates a summary of one of the integer fields...any help would
be great.<br>
<br>
yours,<br>
<br>
Robert Buckley<br>
<b><br>
code for the store is here..</b><br>
<br>
var wea_store = new GeoExt.data.FeatureStore({<br>
fields: [{<br>
name: "Bez",<br>
type: "string"<br>
}, {<br>
name: "Standort",<br>
type: "string"<br>
}, {<br>
name: "Betreiber",<br>
type: "string"<br>
}],<br>
<b> </b></font><font size=1 color=red face="Arial"><b>
sortInfo: {field: 'Standort',direction: "ASC"},<br>
groupField: 'Standort',</b></font><font size=1 face="Arial"><br>
layer: layer_wea<br>
}); <br>
<br>
<b><br>
here is the code for the grid...</b><br>
var wea_attribgridPanel = new Ext.grid.GridPanel({<br>
title: "Tabelle",<br>
</font><font size=1 color=red face="Arial"><b> view:
new Ext.grid.GroupingView(),</b></font><font size=1 face="Arial"><br>
region: "center",<br>
autoWidth : true,<br>
stripeRows: true,<br>
height: 350,<br>
viewConfig: {<br>
forceFit: true<br>
},<br>
store: wea_store,<br>
sm: new GeoExt.grid.FeatureSelectionModel(),<br>
cm: new Ext.grid.ColumnModel({<br>
defaults: {<br>
sortable: true<br>
},<br>
columns: [{<br>
header: "Bez",<br>
dataIndex: "Bez",<br>
width: 25<br>
}, {<br>
header: "Standort",<br>
dataIndex: "Standort"<br>
}, {<br>
header: "Betreiber",<br>
dataIndex: "Betreiber",<br>
width: 135<br>
}]<br>
}),<br>
bbar: [{<br>
text: "an Auswahl heranzoomen",<br>
handler: function(){<br>
wea_attribgridPanel.getSelectionModel().each(function(rec){<br>
var
feature = rec.get("feature");<br>
wea_mapPanel.map.zoomToExtent(feature.geometry.getBounds());<br>
})<br>
}<br>
},toolbarItems]<br>
});<br>
// 2 x Click in grid<br>
wea_attribgridPanel.on('rowdblclick', function(){<br>
wea_attribgridPanel.getSelectionModel().each(function(rec){<br>
var feature = rec.get("feature");<br>
wea_mapPanel.map.setCenter(feature.geometry.getBounds().getCenterLonLat(),
15);<br>
})<br>
});</font>
<br><font size=1 face="Arial"><br>
<br>
<br>
</font>
<br><tt><font size=2>_______________________________________________<br>
Users mailing list<br>
Users@geoext.org<br>
http://www.geoext.org/cgi-bin/mailman/listinfo/users<br>
</font></tt>
<br>
<br>
<br>