私は得る
'System.Windows.Data.BindingListCollectionView' view does not support sorting
次の CollectionViewSource を使用すると:
<CollectionViewSource Source="{Binding Path=CourseSessions}" x:Key="cvsCourses">
<CollectionViewSource.SortDescriptions>
<ComponentModel:SortDescription PropertyName="StartDate"/>
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
DataContext はObservableCollection<Course>
. 私はEntity Framework 4を使用しており、CourseSessionsはCourseのプロパティです:
public ObjectSet<CourseSession> CourseSessions
この場合、データベースから出てくるデータを並べ替える以外に、どのように並べ替えを指定できますか?