Sort vs data type
Eric Jeunieaux <[email protected]> Thu, 16 Jun 2005 21:53:40 +0200
| Newsgroups | gmane.comp.mozilla.devel.rdf |
|---|---|
| Message-ID | <[email protected]> |
Is there a way to sort a treecol according to the data type of the treecell ?
Here is a tree example : I would like to sort a tree column in a numerical
order,
<tree id="trCntrcEndrsHstry"
flex="1"
datasources="rdf:null"
ref="urn:test"
enableColumDrag="true"
flags="dont-build-content">
<treecols>
<treecol id="trcl1"
label="Number"
sortActive="false"
sortDirection="ascending"
sort="?sort_number"/>
</treecols>
<template>
<rule>
<conditions>
<content uri="?nbr_lst"/>
<member container="?nbr_lst" child="?nbr"/>
<triple subject="?nbr"
predicate="http://test#nbr"
object="?sort_number"/>
</conditions>
<action>
<treechildren flex="1">
<treeitem uri="?nbr">
<treerow>
<treecell label="?sort_number"/>
</treerow>
</treeitem>
</treechildren>
</action>
</rule>
</template>
</tree>
How shoud I proceed in JS ? Is there a way to replace the compare function
of the nsIXULTreeBuilder ?