O'Reilly logo

Silverlight 4 Data and Services Cookbook by Kevin Dockx, Gill Cleeren

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sorting and filtering data

In most applications, you'll want to give the user the ability to filter and/or sort the data they see on their screen. This recipe will show you one way of doing this: by using custom Query methods on your server project and accepting parameters to control the filtering/sorting you want to use.

Getting ready

This recipe uses the AdventureWorks Lite database—a free database you can download from http://www.codeplex.com/MSFTDBProdSamples. To follow this recipe, you need to have this database installed on an SQL Server instance you can access from your machine.

We're starting from the solution completed in the previous recipe. You can find a starter solution located in the Chapter09\Sorting_And_Filtering_Starter\ folder ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required