I am following instructions from this MSDN article:
How to: Sort a GridView Column When a Header Is Clicked
But, I’m binding Entity Framework objects to the ListView.
I get a runtime NotSupportedException “Specified method is not supported” when the Sort() method fails to execute this line:
dataView.SortDescriptions.Clear();
How do I need to adapt this example for Entity Framework?
Look at this post. It’s code written by Thomas Levesque for an attached property that enables the sorting of a GridView by it’s column headers. Really well done.
If it does not fit your needs, you can look on how he implemented its solution.