var obj = new AW.UI.Grid
var SpecialSort = AW.Formats.String.subclass()
SpecialSort.create = function()
{
var obj = this.prototype
obj.comparator = function(values, greater, less, equal, error)
{
return function(i, j)
{
try
{
var a = values[i], b = values[j]
if (a.indexOf("--") < 0 && b.indexOf("--") < 0)
{
if (a > b) {return greater}
if (a < b) {return less}
return equal(i, j)
}
if (a.indexOf("--") == 0)
{
return greater == 1 ? greater : less
}
return greater == 1 ? less : greater
}
catch(e){return error(i, j, e)}
}
}
}
obj.setCellFormat(new SpecialSort, <column position>)
This topic is archived.