0
私はwpfでdatagridを持っています。列ヘッダーにマウスオーバーすると、閉じるボタンが1つ表示されます。プログラムでデータグリッド列を削除
私はそのボタンをクリックすると、列全体を削除する必要があるので、いくつかの機能が必要です。
私はこれを書いています。
<DataTemplate x:Key="AdornerDataTemplate">
<Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,0,0">
<Button Content="X" Width="26" Height="26" Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ctrls:RhinoDataGrid}}, Path=RemoveColumnCommand}" Background="{DynamicResource GridHeaderMouseOverBrush}"></Button>
</Grid>
私はRemoveColumnCommandが実行されますが、それは列のインデックスを持っていないことがわかります。クリックした列をどのように知ることができますか?
PLSが私を助けて。
おかげ ディー