I have a listview that has multiple columns. I am wanting to sort these columns when clicking on the column header.

I see there is a sort function, but am not having much luck in using it.

How can i sort my listview when clicking on the column header?