I have an array that populates a datagrid combobox item renderer of:
public var file_prioritylist:Array = ["High", "Medium", "Normal", "Low" ];
[Bindable]
public var file_priority:ArrayCollection = new
ArrayCollection(file_prioritylist);
to avoid them sorting alphabetically I setup a sortCompareFunction for
that column to use this function:
private function prioritySort(item1:Object, item2:Object):int
{
if (item1.priority == "High" )
{
return 1;
}
else if( item1.priority == "Low" )
{
return -1;
}
else
{
return 0;
}
}
which will get it to sort high or low, but how do I get it to sort the
normal and medium appropriately??? I would also like to be able to group
the datagrid list by values.
http://stackoverflowexception.blogspot.com/2007/01/minor-update-of-grid-component.html
has an example of what would pretty well cover it but I cannot get it to
work with the swc file. I would also like to be able to learn from the
code than just use it.
tia
Impudent1
LeapFrog Productions