wpfアプリにGridControlがあります。デフォルトでは、並べ替えとグループ化は無効になっており、それらを有効にするための適切なプロパティが見つかりませんでした。
どうすればこれを修正できますか?
グリッドは次のとおりです。
<dxg:GridControl ItemsSource="{Binding Source={StaticResource progs}}" Height="600" Margin="5" x:Name="grid">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Mentor.LName"/>
<dxg:GridColumn FieldName="Time"/>
<dxg:GridColumn FieldName="STID"/>
<dxg:GridColumn FieldName="Student.LName"/>
<dxg:GridColumn FieldName="EID"/>
<dxg:GridColumn FieldName="ExtraStudent.LName"/>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView x:Name="tview" AllowFixedGroups="True" ShowGroupedColumns="True" NavigationStyle="Row"
AllowPerPixelScrolling="True" AllowSorting="True"
AllowEditing="False" AutoWidth="True" AllowGrouping="True" AllowMoving="True"
RowDoubleClick="TableView_RowDoubleClick" />
</dxg:GridControl.View>
</dxg:GridControl>
起源:
<CollectionViewSource x:Key="progs" />
これがコードです:
var progSource = (CollectionViewSource)Resources["progs"];
progSource.Source = (from f in db.Programmes where f.Date == dateTimePicker.Text select f).GroupBy(m => m.MID);
progView = (BindingListCollectionView)progSource.View;