Hello,
We are using a datagrid in the application, in the datagrid is a template column which contains a checkbox.
<DataGrid Grid.Row="1" ColumnWidth="SizeToHeader" AreRowDetailsFrozen="True" SelectionUnit="FullRow" SelectionMode="Single" IsReadOnly="True" Sorting="DataGridSuspects_OnSorting" LoadingRowDetails="DataGridSuspects_OnLoadingRowDetails" ItemsSource="{Binding TheSource}" SelectedItem="{Binding CurrentSelectedItem}">
So here is the code for the inserted CheckBox:
<DataGridTemplateColumn Width="SizeToCells" CanUserSort="False" CanUserResize="False"><DataGridTemplateColumn.Header><CheckBox IsChecked="{Binding DataContext.AllSuspectsChecked, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=views:View}}"/></DataGridTemplateColumn.Header><DataGridTemplateColumn.CellTemplate><DataTemplate><CheckBox IsChecked="{Binding Path=IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></CheckBox></DataTemplate></DataGridTemplateColumn.CellTemplate></DataGridTemplateColumn>
Now i have the following problem, as soon as the checkbox is clicked, the rowdetails of the datagrid are being shown.
But i want to prevent the rowdetails to be shown when the checkbox is clicked.
Any ideas how i could do that?
Thanks