MaterialDesignInXamlToolkit
MaterialDesignInXamlToolkit copied to clipboard
Datagrid - column with select checkbox and select all column header
Discussed in https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/discussions/2739
Originally posted by hahyes June 9, 2022 Hi there, I followed known to me way to add to Datagrid column to select datagriditems
<DataGrid.RowHeaderTemplate>
<DataTemplate>
<Grid>
<CheckBox IsChecked="{Binding Path=IsSelected, Mode=TwoWay,
RelativeSource={RelativeSource FindAncestor,
AncestorType={x:Type DataGridRow}}}"/>
</Grid>
</DataTemplate>
</DataGrid.RowHeaderTemplate>
In default WPF it works as intended. In MaterialDesign it is not showing anything. Is there any way to achieve similar effect without too much code? Solution above was simple enough to implement, maybe I can do this with some fixes?
@hahyes I can't reproduce the issue

Can you provide a test repo or something to be able to reproduce the problem please ?
@hahyes, I'll close this issue as there has been multiple months gone by with no answer. Feel free to reopen if you can provide us with more information regarding the problem.
Not sure if related but in my case it was simply HeadersVisibility="All" (which seems to be the default in WPF)
<Style x:Key="MaterialDesignDataGrid" TargetType="{x:Type DataGrid}">
<Setter Property="HeadersVisibility" Value="Column" />