Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
210
Empty Groups in the xamDataGrid
posted

I need to show the groupby record irrespective of if there is item with that grouping in the list.

Eg: assume I have possible Group values of Group 1, Group 2 and Group 3. And list that is bound to the xamDataGrid is empty. it should show

+Group1 (Count 0)

+Group2(Count 0)

+Group3(Count 0)

Equivalent can be done in ListView by adding all the group description to the collectionview source and binding it to the ListView ItemsSource.

var collectionView = new CollectionViewSource();

var groupDescription = new PropertyGroupDescription("GroupField");
groupDescription.GroupNames.Add("Group 1");
groupDescription.GroupNames.Add("Group 2");
groupDescription.GroupNames.Add("Group 3");
collectionView.GroupDescriptions.Add(groupDescription);

Any suggestions?