2

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 seem to be respecting the sort order. How can I get the gridview to respect my default sort order?

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.