|Sent on:||Monday, November 5, 2007 1:42 PM|
Not sure how the 2 are related. You need to sort the entire collection before you know which the first 100 are.
From: [address removed] [mailto:[address removed]]
On Behalf Of Alec Bryte
Sent: Monday, November 05,[masked]:37 PM
To: [address removed]
Subject: [dotnet-120] LINQ2SQL and sorting in ListView
Has anyone attempted to use sorting when binding a result set from a LINQ select query to a ListView.
I found several examples on the web but they all use an offline collection of items.
Right now when a user clicks a column header for sorting, I'm redoing the query with a different "orderby" clause in it and rebinding it to the ListView, but something is telling me there is an easier way to do it. I wonder if there is a built-in support for optimized SQL data retrieval and pagination/virtualization, e.g. if I have[masked] records, the ListView should retrieve only the first 100 or something, until a user scrolls down to see the next 100 batch.
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Alec Bryte ([address removed]) from New York .NET Meetup Group.
To learn more about Alec Bryte, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here
Meetup.com Customer Service: [address removed]
632 Broadway New York NY 10012 USA