The use of custom CheckBoxComboBox control in DataGridView is done. First I have added a DataGridViewTextBoxColumn or any other as per your requirement and then add the custom CheckBoxComboBox column in that DataGridView in following way.
First you need to create the list of items to be shown in that Combo Box
List<Status> statuses = new List<Status>();
statuses.Add(new Status(1, "Sunday"));
statuses.Add(new Status(2, "Monday"));
statuses.Add(new Status(3, "Tuesday"));
statuses.Add(new Status(4, "Wednesday"));
statuses.Add(new Status(5, "Thursday"));
statuses.Add(new Status(6, "Friday"));
statuses.Add(new Status(7, "Saturday"));
Then you need to create the object of DataGridViewCheckBoxComboBoxColumn
DataGridViewCheckBoxComboBoxColumn comboboxColumn = new DataGridViewCheckBoxComboBoxColumn();
Create an object of ListSelectionWrapper from that statuses List object and set its TextSeparator property.
ListSelectionWrapper<Object> wrappedList = new ListSelectionWrapper<Object>(statuses);
wrappedList.TextSeparator = comboboxColumn.TextSeparator;
Add comboboxColumn other properties as
comboboxColumn.DataSource = wrappedList;
comboboxColumn.ValueMember = "Selected";
comboboxColumn.DisplayMemberSingleItem = "Name";
comboboxColumn.DisplayMember = "NameConcatenated";
And then insert the column in DataGridView
dgvKioskList.Columns.Add(comboboxColumn);
After this your column is inserted in your DataGridView. Now to insert a new row with pre-selected some list items, you need to create a Dictionary object like
Dictionary<String, Object> objSelectedDays = new Dictionary<String, Object>();
If you want to select the Sunday and Tuesday from the ComboBox for example you could write
objSelectedDays.Add("Sunday", statuses[0]);
objSelectedDays.Add("Tuesday", statuses[2]);
After this when you insert a new row into DataGridView with your other data and this objSelectedDays object, the new row will be added to grid
datagridView1.Rows.Add("ID1", objSelectedDays);
where "ID1" is inserted into simple DataGridViewTextBoxColumn
If you want to read the selected values from the datagrid then type cast the cell into Dictionary object like
var values = datagridView1.Rows[0].Cells[1].Value as Dictionary<String, Object>;
and then loop though the values object array to read the selected values from the particular rows CheckBoxComboBox control