DevExpress-Examples / xaf-how-to-sort-a-listview-in-code

How to sort a list view by a class property and prevent users from changing the sorting themselves

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Files to look at:

How to sort a ListView in code

Scenario: You need to sort a list view by a class property and disallow end-users from changing this sorting themselves.

Solution: Implement a ViewController and configure the sorting operation for this ListView's required column in the application model. You can do this in the SortListViewControllerBase class that is platform-agnostic. After that, implement platform-dependent controllers that disable the sorting functionality in the grid.

This approach can be used to sort both nested and root ListViews, and also will work if the server mode is enabled in the ListView.

See Also:
How to sort a nested ListView at the business objects level, in code
How to prevent sorting and grouping by certain columns in a ListView
How to: Access the Application Model in Code


About

How to sort a list view by a class property and prevent users from changing the sorting themselves

License:Other


Languages

Language:C# 72.9%Language:HTML 27.1%