XTRootRecord.reSort Member

Syntax

object.reSort();

Returns

Remarks

See Also

Source Code

function torr_resort ()
{
if ("_treeView" in this && this._treeView.frozen)
{
this._treeView.needsReSort = true;
return;
}
if (!("childData" in this) || this.childData.length < 1 ||
(this.childData[0].sortCompare == xtvr_sortcmp &&
!("sortColumn" in this._share) || this._share.sortDirection == 0))
{
/* if we have no children, or we have the default sort compare but we're
* missing a sort flag, then just exit */
return;
}
this.childData.sort(this.childData[0].sortCompare);
for (var i = 0; i < this.childData.length; ++i)
{
if ("isContainerOpen" in this.childData[i] &&
this.childData[i].isContainerOpen)
this.childData[i].reSort(true);
else
this.childData[i].sortIsInvalid = true;
}
if ("_treeView" in this && this._treeView.tree)
{
/*
dd ("root node: invalidating 0 - " + this.visualFootprint +
" for sort");
*/
this.invalidateCache();
this._treeView.tree.invalidateRange (0, this.visualFootprint);
}
}