开发者

ASP.NET GridView Sort?

开发者 https://www.devze.com 2023-01-02 06:55 出处:网络
I\'m performing a query with a sort in the Selecting event of the LinqDataSource. I\'m then casting my query to a list and assigning it to the result. I\'m using this data source in an ASP.NET gridvie

I'm performing a query with a sort in the Selecting event of the LinqDataSource. I'm then casting my query to a list and assigning it to the result. I'm using this data source in an ASP.NET gridview.

I can see the list is sorted but when the ASP.NET gridview does not s开发者_Python百科eem to be respecting the sort order. How can I get the gridview to respect my default sort order?


See, this is why I post here. I spent 30 minutes trying to figure this out. Post here. And 20 seconds later I figure out my own answer.

I had a SortOrder defined in the declarative syntax for the Linqdatasource.

0

精彩评论

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

关注公众号