I would suggest you attempt to try it using a view. Grids do some
heavy datapath manipulation and are not always the most flexible to
use
<view datapath="eventlist:/events/">
<view datapath="event">
<text datapath="ltimestamp/text()" fgcolor="$path{'lcolor/text()'}"
width="200"/>
</view>
</view>
On 5/23/07, Ong Leong Seng <[EMAIL PROTECTED]> wrote:
Hi all,
I have doubt on datapath. I declare a grid and bind it with a dataset as
shown below.
<dataset name="eventlist">
<events>
<event>
<ftimestamp> 2006-06-25 23:37:00</ftimestamp>
<ltimestamp> 2006-06-25 23:47:00</ltimestamp>
<description> Intruder detection</description>
<recurring>2</recurring>
<level>Alert</level>
<lcolor>#FF6600</lcolor>
</event>
</events>
</dataset>
<grid datapath="eventlist:/events/" width="${parent.width-55}"
height="100%" spacing="0" rowheight="18">
<gridcolumn width="150"> Timestamp <text datapath="ltimestamp/text()"/>
</gridcolumn >
<gridtext editable="false" datapath="description/text()"
width="${parent.width - 210}"> Event Description </gridtext >
<gridtext editable="false" datapath="recurring/text()" width="60"
textalign="center"> Recur.. </gridtext >
</grid>
I would like to use the lcolor in the dataset on my TEXT element fgcolor
attribute in gridcolumn. I try several way but didn't work. Any idea to
directly bind the lcolor to fgcolor just like datapath for TEXT?
I am not really good in dataset, datapath, xpath. Where can I learn more on
this? I finish my study on developer manual but I wish to know more.
Thank you.
Cheers,
James