开发者

Sortable ObservableCollection in Silverlight

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜