What code would it be to sort different fields when using repeater?

Pl guys help me with a code as i need to sort results in repeaters by different fields like grading, price and activities. Any help would be greatly appreciated.
Pl see the attached image.

https://www.wix.com/corvid/example/mega-search

Thank you so much for taking time to reply. The example therein is so comprehensive in itself. I just hope i could able to implement it correctly.
Much Respect.