<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:8pt">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..."<span role="presentation" class="objectBox objectBox-errorMessage hasTwisty hasBreakSwitch opened">this.grid.store.getGroupState is not a function"</span><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><br><span style="font-weight: bold;">code for the store is here..</span><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> <span style="font-weight: bold;"> <span style="color: rgb(255, 0, 0);"> sortInfo: {field: 'Standort',direction: "ASC"},</span></span><br style="font-weight: bold; color: rgb(255, 0, 0);"><span style="font-weight: bold; color: rgb(255, 0,
0);"> groupField: 'Standort',</span><br> layer: layer_wea<br> }); <br><br><br><span style="font-weight: bold;">here is the code for the grid...</span><br style="font-weight: bold;">var wea_attribgridPanel = new Ext.grid.GridPanel({<br> title: "Tabelle",<br> <span style="font-weight: bold; color: rgb(255, 0, 0);"> view: new Ext.grid.GroupingView(),</span><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>
});<br><div><br><br><br><br></div>
</div><br></body></html>