Grid

Sorting Example

This example demonstrates how to use sorting in the Soby Data Grid.
"AddOrderByField" method takes two parameters. First one is the name of the field. Second one is a boolean value to state whether it should be sorted as ascending or descending. This method does not trigger data population, it just adds the orderbyfield which will be used on population.

bookGrid.AddOrderByField("Title", true);

Below functionality uses "SortResult" method which takes two parameters. First one is the name of the field. Second one is a boolean value to state whether it should be sorted as ascending or descending. This method triggers the data population.