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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access