Ok so I have a database which contains a table called files. This file table contains a list of file names, file locations and the size of each file.

I have managed to use a model to display the file names in a combobox. However, i want the file names to be populated in the combobox in decreasing order of file size. I have created a quicksort algorithm which is capable of sorting numbers , so how would i use the model and my algorithm to do what I require.... i don't even know where to start?! I have to use my own sorting algorithm as it's a requirement for the project I am doing.

If someone could point me in the right direction I would be so grateful!

Thanks very much for your time and trouble