O'Reilly logo

Visual Basic® .NET by Example by Bob Donald, Gabriel Oancea

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 DataSets

Rows in a DataSet can be filtered and sorted as needed. There are two ways of doing this. The simple way is to use the Select method on the DataSet object. The Select method allows you to pass in SQL like strings for selecting a set of rows and optionally sorting those rows. When you call the Select method, the database is not queried again. Only the rows that exist in the loaded DataSet are used for satisfying the filtering request. This can improve application performance if the application needs to load some data and then display it in several different ways. In this case, the data is loaded once and then filtered and sorted as needed in memory.

The second way of performing filtering and sorting of DataSets is ...

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