PDA

View Full Version : Grid control


tester1
08-25-2006, 10:29 AM
Is there any way that we can sort numbers in a grid?
XML file:
<list>
<employee name="abc" code="400263" />
<employee name="def" code="33003" />
<employee name="ijk" code="33099" />
<employee name="xyz" code="200389"/>


</list>

LZX file:
<canvas height="250" maxtextwidth="1000">


<dataset name="gridData" src="result.xml"/>
<grid datapath="gridData:/list">
<gridcolumn width="300">Name
<text datapath="@name"/>
</gridcolumn>

<gridcolumn width="300">Number
<text datapath="@code" />
</gridcolumn>
</grid>


</canvas>

Geoff2010
08-25-2006, 05:22 PM
Yes, you would simply change your gridcolumn definition to something like:


<gridcolumn width="300" datatype="number" sortpath="@code">Number
<text datapath="@code" />
</gridcolumn>

tester1
08-25-2006, 08:49 PM
Thanks Geoff.

I had another question. Does grid component (and not gridcolumn) has datatype attribute? How do I sort numbers if I am not using gridcolumn?

<canvas height="500">
<dataset name="dset" request="true"
src="dashboard.xml" />
<grid datapath="dset:/weather" contentdatapath="forecast/day" />
</canvas>

Geoff2010
08-25-2006, 08:53 PM
It is my understanding that if you want any "advanced" functionality and customization inside the grid you are supposed to use gridcolumn classes... I have never really used just the basic grid, so I am not sure.

-Geoff