hi all..<br><br>following lines contain my code to display the attribute grid of a geometry...<br>how the selected feature's extend is obtained so that I can zoom the map up to that extend?<br><br>thanking u<br><br>Febin<br>
===================================================================<br><br>layerFeatureStore = new GeoExt.data.FeatureStore({<br> fields : [<br> {name: "WATER_TYPE", type: "string"},<br>
{name: "CNTRY_NAME", type: "string"},<br>
{name: "CONTINENT", type: "string"}<br> ],<br> layer :wfsEditableLayer,<br> addFeatureFilter: function(feature) {<br> return feature.state !== OpenLayers.State.DELETE;<br>
},<br> autoload:true<br> });<br>columnModel = new Ext.grid.ColumnModel({<br> defaults: {<br> sortable: true,<br> editable:true,<br> },<br> columns: [<br>
{header: "WATER_TYPE", dataIndex: "WATER_TYPE",editor: new Ext.form.TextField()},<br> {header: "CNTRY_NAME", dataIndex: "CNTRY_NAME",editor: new Ext.form.TextField()},<br>
{header: "CONTINENT", dataIndex: "CONTINENT",editor: new Ext.form.TextField()},<br> ]<br> });<br>attribGridPanel = new Ext.grid.EditorGridPanel({<br>
title : "Feature Table " + layer_name,<br> region : "center",<br> viewConfig : {forceFit: true},<br> store : layerFeatureStore,<br> listeners : {<br>
afteredit: function(e) {<br>
var feature = e.record.get("feature");<br> if(feature.state !== OpenLayers.State.INSERT) {<br> feature.state = OpenLayers.State.UPDATE;<br> }<br>
}<br> },<br> sm: new GeoExt.grid.FeatureSelectionModel({<br> selectControl: modifyControl.selectControl,<br> singleSelect: true,<br> clicksToEdit:1,<br>
}),<br> cm: columnModel<br> });<br>