开发者

How do I sort a GridView column When a header Is clicked?

开发者 https://www.devze.com 2023-02-12 03:56 出处:网络
I am following instructions from this MSDN article: How to: Sort a GridView Column When a He开发者_运维百科ader Is Clicked

I am following instructions from this MSDN article:

How to: Sort a GridView Column When a He开发者_运维百科ader 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消