View Full Version : How concat field !
oleane
08-28-2004, 09:22 AM
Please,
Does someone know how to concat 2 datapath fields text into gridcolumn
For example : FirstName + LastName
Thank
antun
08-30-2004, 08:57 AM
It's really about the text field inside of the gridcolumn:
<canvas debug="true">
<dataset name="myds">
<myroot>
<firstName>Homer</firstName>
<lastName>Simpson</lastName>
</myroot>
</dataset>
<class name="fullNameTextField" extends="text">
<method name="applyData" args="d">
var fullName = d + " "
+ this.datapath.xpathQuery("../lastName/text()");
this.setText( fullName );
</method>
</class>
<view datapath="myds:/myroot">
<fullNameTextField datapath="firstName/text()" width="300" />
</view>
</canvas>
In LZX, if you want to override the default behavior an element does with its data, you can overwrite the applyData method. The same principle can also be used to have a view set its src (image ) to the URL of its datapath.
-Antun
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.