New to Telerik UI for WPF? Download free 30-day trial

CardView Refresh Collection After Group Changes

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.

private void UpdateItem() 
{ 
    var qcv = (QueryableCollectionView)this.cardView.ItemsSource; 
    var dataItem = (Person)qcv[0]; 
    dataItem.GroupKeyProperty = "new group value"; 
    qcv.GroupDescriptors.Reset(); 
} 
In this article