You could use the grouping engine to do this by adding a SummaryDescriptor of type FilterBarChoicesSummary. This is the way the GridGroupingControl gets its unqiue values for its filtercell dropdowns. The Values property will returns a list of unqiue values.
But since you are moving your list into an arraylist anyway, you could just sort teh arraylist and remove the duplicates turning the array list in a list of unique values.
ArrayList list = new ArrayList (gridData.Rows.Count);
foreach (DataRow row in gridData.Rows)
{
list.Add(AquadorNET.DataExtraction.GetIntFromDBObject(row["X"], -1));
}
list.Sort();
int i = 0;
while (i + 1 < list.Count)
{
if(list[i] = list[i+1]
{
list.RemoveAt(i);
}
else
i += 1;
}
I did not run the above code, so I may have overlooked something, but this is similar to the technique we use the CreateUniqueEntries code in the GridDataBoundGrid FilterBar if you need to see some working code.