<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
The Ext edit-grid example shows a grid with user-specified headers :<br>
<br>
<a class="moz-txt-link-freetext" href="http://dev.sencha.com/deploy/ext-3.3.1/examples/grid/edit-grid.html">http://dev.sencha.com/deploy/ext-3.3.1/examples/grid/edit-grid.html</a><br>
<br>
Regards,<br>
<br>
Alexandre<br>
<br>
<br>
On 11-08-17 04:02 AM, Robert Buckley wrote:
<blockquote
cite="mid:1313568124.37429.YahooMailRC@web24105.mail.ird.yahoo.com"
type="cite">
<style type="text/css"><!-- DIV {margin:0px;} --></style>
<div style="font-family: arial,helvetica,sans-serif; font-size:
10pt; color: rgb(0, 0, 0);">
<div>Hi</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Has anyone done this, or does anyone have a workaround?</div>
<div><br>
</div>
<div><br>
</div>
<div>Yours,</div>
<div><br>
</div>
<div>Rob</div>
<div><br>
</div>
<div><code></div>
<div><br>
</div>
<div>
<div>var popup_wea</div>
<div> layer_wea.events.on({</div>
<div> featureselected: function (event) {</div>
<div> var propsGrid = new Ext.grid.PropertyGrid({</div>
<div> autoHeight: true,</div>
<div> source: event.feature.attributes</div>
<div> });</div>
<div> propsGrid.getColumnModel().setColumnHeader(0,
'EIGENSCHAFT');</div>
<div> propsGrid.getColumnModel().setColumnHeader(1,
'WERT');</div>
<div> popup_wea = new GeoExt.Popup({</div>
<div> id: 'popup_wea',</div>
<div> title: "Informationen",</div>
<div> feature: event.feature,</div>
<div> collapsible: true,</div>
<div> layout: "fit",</div>
<div> autoHeight: true,</div>
<div> panIn: true,</div>
<div> width: 270,</div>
<div> unpinnable: true,</div>
<div> border: false,</div>
<div> items: [propsGrid],</div>
<div> listeners: {</div>
<div> "close": function() {</div>
<div> select.unselect(this.feature);</div>
<div> }</div>
<div> }</div>
<div> });</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span>//
unselect feature when the popup is closed</div>
<div> popup_wea.on({</div>
<div> close: function() {</div>
<div>
if(OpenLayers.Util.indexOf(layer_wea.selectedFeatures,
this.feature) > -1) {</div>
<div> select.unselect(this.feature);</div>
<div> }</div>
<div> }</div>
<div> });</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div> popup_wea.show();</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> <br>
</span></div>
<div> },</div>
<div> featureunselected: function (event) {</div>
<div> popup_wea.destroy();</div>
<div> }</div>
<div><span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div> });</div>
</div>
<div><br>
</div>
<div></code></div>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@geoext.org">Users@geoext.org</a>
<a class="moz-txt-link-freetext" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Alexandre Dubé
Mapgears
<a class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
</body>
</html>