WebGrid provides a sorting feature which is very useful to sort data in ascending or descending behavior.
In this topic, you will learn the basic thing on how to apply sorting feature in WebGrid.
To sort data in WebGrid
- Open WebGrid.NET Designer.
- In Layout Settings, set AllowSorting to Yes.
- Click OK to apply the changes.
- Run the project.
- Click on any header columns to apply sorting data.
To apply multiple sorting data in WebGrid
- Open WebGrid.NET Designer.
- In Layout Settings, set HeaderClickAction to SortMulti.
- Click OK to apply the changes.
- Run the project.
- Click on any header columns and press SHIFT key to apply multiple sorting data.
Tasks
Walkthrough: Applying CustomSort in WebGrid
References
AllowSorting Property
HeaderClickAction Property
Other Resources
Walkthrough Topics
How-to Topics