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