Sorting Record Fields HELP!

Hi all you experts, I am a beginner to pascal.
I have a record with fields Name and Grade, and I have problem thinkin
how to sort according to Name OR Grade in a TextFile not BinFile.
All help appreciated.

TIA

Cheers