Skip to content

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

License

Notifications You must be signed in to change notification settings

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

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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


Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published