I'm trying to programmatically bind an IList to a datagrid and one of the columns is a boolean value, so I decided to use a DataGridCheckBoxColumn instead of my usual DataGridTextColumn. Unfortunately, this doesn't seem to be working.
This the code I am currently using:
DataGridCheckBoxColumn dgcbc = new DataGridCheckBoxColumn();
Binding b = new Binding("Convicted");
dgcbc.Header = "Convicted";
dgcbc.Binding = b;
this.dgResults.Columns.Add(dgcbc);
After I set the source for the DataGrid the checkbox column shows up, but they are all unchecked. If I switch the DGCBC back to a DGTC the binding correctly shows up as either "true" or "false". Any ideas?