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

How to: Generate NavBarControl Items from a Collection and Automatically Group Them Depending on a Field Value

$
0
0

In this example, it's demonstrated how to use the GroupDescription property to automatically group items generated from a collection. To accomplish this task, it's necessary to set GroupDescription to a property name by which items should be grouped.


Another solution to group items is to bind NavBarControl to a source that implements ICollectionView and specify GroupDescriptions:

[C#]
CollectionViewEmployees.GroupDescriptions.Add(newPropertyGroupDescription("Department"));

 

If you wish to specify ItemsSource for each group separately, use the approach demonstrated at How to: Generate NavBarControl Groups and Items from a Collection


Viewing all articles
Browse latest Browse all 7205

Trending Articles



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