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 |
Product Version | 2023.3.1010 |
Product | RadCardView for WPF |
How to change the group of a card when a property in an object has been changed.
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.
{{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}}