0
をナビゲートするときに「SelectionUnitがFullRowときに、セルの選択を変更することはできません」私はNavigationWindow
でPage
にそれを使用する簡単なDataGrid
WPF:他のページへ
<DataGrid AutoGenerateColumns="False"
ItemsSource="{Binding Items, Mode=TwoWay}"
CanUserAddRows="True" CanUserDeleteRows="True"
SelectionMode="Single"
SelectedItem="{Binding SelectedItem, Mode=TwoWay}" SelectionUnit="FullRow" >
<DataGridTextColumn Header="Name"
Binding="{Binding Path=Name, Mode=TwoWay}"
CellStyle="{StaticResource CellDefaultStyle}" />
</DataGrid>
を持っています。私がページを開いて別のページに移動すると、すべて正常です。
しかし、私はページを開いて、データグリッド内の行を選択し、別のページに移動するとき、私はエラーを取得する:
Cannot change cell selection when the SelectionUnit is FullRow.
しかし、私はFullRow
選択部を維持したいです。