[Users] popup Field alias possible?
Alexandre Dube
adube at mapgears.com
Wed Aug 17 14:22:55 CEST 2011
The Ext edit-grid example shows a grid with user-specified headers :
http://dev.sencha.com/deploy/ext-3.3.1/examples/grid/edit-grid.html
Regards,
Alexandre
On 11-08-17 04:02 AM, Robert Buckley wrote:
> Hi
>
> i have a popup which lists the attributes from my wfs layer in a
> PropertyGrid. This looks really great, but my Fieldnames are coded and
> have little meaning on first glance. I would like to assign aliases to
> the Fields and show them in the EditorGrid.
>
> Has anyone done this, or does anyone have a workaround?
>
>
> Yours,
>
> Rob
>
> <code>
>
> var popup_wea
> layer_wea.events.on({
> featureselected: function (event) {
> var propsGrid = new Ext.grid.PropertyGrid({
> autoHeight: true,
> source: event.feature.attributes
> });
> propsGrid.getColumnModel().setColumnHeader(0, 'EIGENSCHAFT');
> propsGrid.getColumnModel().setColumnHeader(1, 'WERT');
> popup_wea = new GeoExt.Popup({
> id: 'popup_wea',
> title: "Informationen",
> feature: event.feature,
> collapsible: true,
> layout: "fit",
> autoHeight: true,
> panIn: true,
> width: 270,
> unpinnable: true,
> border: false,
> items: [propsGrid],
> listeners: {
> "close": function() {
> select.unselect(this.feature);
> }
> }
> });
> // unselect feature when the popup is closed
> popup_wea.on({
> close: function() {
> if(OpenLayers.Util.indexOf(layer_wea.selectedFeatures,
> this.feature) > -1) {
> select.unselect(this.feature);
> }
> }
> });
> popup_wea.show();
>
> },
> featureunselected: function (event) {
> popup_wea.destroy();
> }
> });
>
> </code>
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Alexandre Dubé
Mapgears
www.mapgears.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110817/0d5a6249/attachment.htm
More information about the Users
mailing list