I´ve got the following DataGrid:
<DataGrid AutoGenerateColumns="True" Grid.ColumnSpan="9" Grid.Row="2" Grid.RowSpan="8" Height="583" HorizontalAlignment="Left" Name="dgAufgaben" VerticalAlignment="Top" Width="1344" AlternatingRowBackground="#E6DBDBDB" RowHeight="55">
<DataGrid.Columns>
<DataGridCheckBoxColumn Header="sseas"></DataGridCheckBoxColumn>
</DataGrid.Columns>
</DataGrid>
which I fill in this way:
DataSet ds = new DataSet();
aufrep.GetAufgaben(ds, loginid);
dgAufgaben.DataContext = ds;
dgAufgaben.ItemsSource = ds.Tables[0].DefaultView;
So the data, that I receive out of my database are in the DataSet, the columns are autogenerated. The problem is, that I don´t know how to set the CheckboxColumn to the value of a column of my DataSet. (One column cointains 0 and 1 values)
How can I manage this?
You do know with AutoGenerate = true it will probably create that column a second time. In SQL bool is bit (0,1). You just bind to that column.