Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to sort a nested ListView at the business objects level, in code

$
0
0

This example demonstrates how to provide hidden and permanent sorting by a property in a nested ListView. Suppose we have Order and OrderItem classes that participate in an aggregated One-To-Many relationship.
We want to sort the collection of OrderItem objects by the ModifiedOn property, but do it in a way that end-users won't be able to see that the grid is sorted. Please see the sources of the Order class for more details on how to accomplish this. With this solution, sorting is implemented on the business objects level. Another variant is to use the approach from the How to sort a ListView in code example. This solution uses a specific ViewController.
Alternatively, you can use the Sorting property of the ListView application model element.

See Also:
How to prevent sorting and grouping by certain columns in a ListView


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>