addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1launch-new-window--smalllight-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

LINQ2SQL and sorting in ListView

From: Alec B.
Sent on: Monday, November 5, 2007 12:36 PM
Hey Guys,
 
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.
 
Thanks,
-Alec.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy