User Interface Sorting

If you need to sort the records displayed by the GridView control, the easiest type of sorting to enable is user interface sorting. When you take advantage of user interface sorting, the records are sorted in the server’s memory.

For example, the page in Listing 18.25 contains a GridView that has its AllowSorting property set to the value True. The GridView is bound to an ObjectDataSource that represents the Employees database table (see Figure 18.6).

Figure 18.6. Sorting records with user interface sorting.

image

Listing 18.25. ShowUISorting.aspx

The ObjectDataSource control in Listing 18.25 is bound to the component in ...

Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.