开发者

How do I sort a GridView column When a header 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜