I've created a datagridview of a table which has 3 fields. One of the fields is a boolean field. 1 - true, 0 - false. Instead of displaying 1 or 0 for the boolean field, I would like to display true or false in a combobox (in the datagridview). I've connected a combobox to a table before and linked it to the hidden ID in the datagridview. BUT, I can't figure out how to have a combobox where 1 is true and 0 is false. I'm also not using the GUI to do this. I'm doing this in code.
Any help you can give would be greatly appreciated. Here is a piece of the code. This table is a list of Machine Names (ID, Description, isActive.
Private Sub frmMachinName_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' Dim machineName As New clsDbConn
machineName = New clsDbConn
Me.WindowState = FormWindowState.Maximized
'fill the dgv
Me.BindingSource1.DataSource = machineName.GetMachineNames
Me.dgvMachineNames.DataSource = Me.BindingSource1
'isActive field - want to display true/false instead of 1/0 here ****
Dim listCol As New DataGridViewComboBoxColumn
listCol.HeaderText = "Active"
'xxx ?? how to connect the combo box to the isActive column in the dgv ???
listCol.DisplayMember = "Description"
listCol.ValueMember = "ID"
Me.dgvMachineNames.Columns.Add(listCol) 'add combobox to dgv
'3 columns in the datagridview
Me.dgvMachineNames.Columns("MachineName_id").HeaderCell.Value = "ID" 'change the column header
Me.dgvMachineNames.Columns("MachineName").HeaderCell.Value = "Machine Name"
Me.dgvMachineNames.Columns("isActive").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill