Skip to content

Latest commit

 

History

History
44 lines (38 loc) · 1.2 KB

kb-cardview-fix-group-changes.md

File metadata and controls

44 lines (38 loc) · 1.2 KB
title description type page_title slug position tags ticketid res_type
CardView Refresh Collection After Group Changes
CardView reaply GroupDescriptors after changing card property of the item
how-to
Reaply GroupDescriptors in RadCardView After Changing Group Item
kb-cardview-fix-group-changes
0
groupdescriptors, changes, collectionview, cardview
1630486
kb

Environment

Product Version 2023.3.1010
Product RadCardView for WPF

Description

How to change the group of a card when a property in an object has been changed.

Solution

To achieve this requirement you can use a QueryableCollectionView as the ItemsSource of RadCardView. Then on data item property changed, reset the GroupDescriptors of the collection view.

[C#]

{{region cs-kb-cardview-fix-group-changes}} private void UpdateItem() { var qcv = (QueryableCollectionView)this.cardView.ItemsSource; var dataItem = (Person)qcv[0]; dataItem.GroupKeyProperty = "new group value"; qcv.GroupDescriptors.Reset(); } {{endregion}}