yes it works fine by adding a button to my tool bar..<br><br>Thanks Pierre...<br>=============================================================================<br>        editToolBar = new Ext.Toolbar({    <br>            id:&#39;editToolBar&#39;,<br>
            items: [                   <br>                    {<br>                        xtype: &#39;tbbutton&#39;,<br>                        text: &quot;Zoom&quot;,<br>                        handler: function() {<br>
                            attribGridPanel.getSelectionModel().each(function(rec) {<br>                                var feature = rec.get(&quot;feature&quot;);<br>                                mapPanel.map.zoomToExtent(feature.geometry.getBounds());<br>
                                })<br>                                    }<br>                        }<br>                ]<br>            });<br><br><div class="gmail_quote">On Mon, Jun 21, 2010 at 3:12 PM, Pierre Giraud <span dir="ltr">&lt;<a href="mailto:pierre.giraud@camptocamp.com">pierre.giraud@camptocamp.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br>
<br>
You can use the following :<br>
feature.geometry.getBounds()<br>
<a href="http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Geometry-js.html#OpenLayers.Geometry.getBounds" target="_blank">http://dev.openlayers.org/releases/OpenLayers-2.7/doc/apidocs/files/OpenLayers/Geometry-js.html#OpenLayers.Geometry.getBounds</a><br>

<br>
Kind regards,<br>
Pierre<br>
<div><div></div><div class="h5"><br>
On Mon, Jun 21, 2010 at 11:29 AM, Febin T T &lt;<a href="mailto:febin@sblgis.com">febin@sblgis.com</a>&gt; wrote:<br>
&gt; hi all..<br>
&gt;<br>
&gt; following lines contain my code to display the attribute grid of a<br>
&gt; geometry...<br>
&gt; how the selected feature&#39;s extend is obtained so that I can  zoom the map up<br>
&gt; to that extend?<br>
&gt;<br>
&gt; thanking u<br>
&gt;<br>
&gt; Febin<br>
&gt; ===================================================================<br>
&gt;<br>
&gt; layerFeatureStore = new GeoExt.data.FeatureStore({<br>
&gt;     fields        : [<br>
&gt;                 {name: &quot;WATER_TYPE&quot;, type: &quot;string&quot;},<br>
&gt;                 {name: &quot;CNTRY_NAME&quot;, type: &quot;string&quot;},<br>
&gt;                 {name: &quot;CONTINENT&quot;, type: &quot;string&quot;}<br>
&gt;               ],<br>
&gt;     layer        :wfsEditableLayer,<br>
&gt;     addFeatureFilter: function(feature) {<br>
&gt;         return feature.state !== OpenLayers.State.DELETE;<br>
&gt;             },<br>
&gt;     autoload:true<br>
&gt;     });<br>
&gt; columnModel = new Ext.grid.ColumnModel({<br>
&gt;         defaults: {<br>
&gt;                        sortable: true,<br>
&gt;             editable:true,<br>
&gt;                 },<br>
&gt;             columns: [<br>
&gt;                                   {header: &quot;WATER_TYPE&quot;, dataIndex:<br>
&gt; &quot;WATER_TYPE&quot;,editor: new Ext.form.TextField()},<br>
&gt;                                   {header: &quot;CNTRY_NAME&quot;, dataIndex:<br>
&gt; &quot;CNTRY_NAME&quot;,editor: new Ext.form.TextField()},<br>
&gt;                                   {header: &quot;CONTINENT&quot;, dataIndex:<br>
&gt; &quot;CONTINENT&quot;,editor: new Ext.form.TextField()},<br>
&gt;                            ]<br>
&gt;                        });<br>
&gt; attribGridPanel = new Ext.grid.EditorGridPanel({<br>
&gt;     title        : &quot;Feature Table &quot; + layer_name,<br>
&gt;     region        : &quot;center&quot;,<br>
&gt;         viewConfig    : {forceFit: true},<br>
&gt;         store        : layerFeatureStore,<br>
&gt;     listeners    : {<br>
&gt;         afteredit: function(e) {<br>
&gt;             var feature = e.record.get(&quot;feature&quot;);<br>
&gt;             if(feature.state !== OpenLayers.State.INSERT) {<br>
&gt;                         feature.state = OpenLayers.State.UPDATE;<br>
&gt;                        }<br>
&gt;                    }<br>
&gt;         },<br>
&gt;     sm: new GeoExt.grid.FeatureSelectionModel({<br>
&gt;                 selectControl: modifyControl.selectControl,<br>
&gt;                 singleSelect: true,<br>
&gt;             clicksToEdit:1,<br>
&gt;             }),<br>
&gt;         cm: columnModel<br>
&gt;            });<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@geoext.org">Users@geoext.org</a><br>
&gt; <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
Pierre GIRAUD<br>
Géomaticien, Analyste<br>
<br>
Camptocamp France SAS<br>
Savoie Technolac, BP 352<br>
73377 Le Bourget du Lac, Cedex<br>
<br>
Tel : 00 33 4 79 44 44 93<br>
Mail : <a href="mailto:pierre.giraud@camptocamp.com">pierre.giraud@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
</blockquote></div><br>