开发者

Sortable ObservableCollection in Silverlight

开发者 https://www.devze.com 2023-01-01 00:01 出处:网络
I followed the link mentioned in this post http://mokosh.co.uk/post/2009/08/04/how-to-sort-observablecollection/comment-page-1/#comment-75

I followed the link mentioned in this post http://mokosh.co.uk/post/2009/08/04/how-to-sort-observablecollection/comment-page-1/#comment-75

but having issues getting it to work in Silverlight

I created a property public SortableObservabl开发者_如何学运维eCollection Terms When I call Terms.Sort(new TermComparer()) the records are still display unsorted on the UI

could some suggest what could be going wrong. thanks


Make sure you're firing the Collection changed event

OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));  

Since that's what will cause the UI to refresh.

0

精彩评论

暂无评论...
验证码 换一张
取 消