I have a problem adding a checkbox-column to a WPF-datagrid.
- I create a datatable with 8 columns and fill it using sql.
I bind the datatable to the WPF-datagrid using ItemsSource like:
XAML:
<DataGrid x:Name="dgOPListEntries" Grid.Row="1" Grid.ColumnSpan="2" Margin="5" ItemsSource="{Binding}" AutoGenerateColumns="True"></DataGrid>CodeBehind:
dgOPListEntries.ItemsSource = dtOPListEntries.DefaultView;
So far, this works fine.
I now want to add a checkbox-column to the datagrid where I can select some rows. (The selected rows will then be updated on the sql server.)
Any help is appreciated.