Dim dt As New DataTable("tblFirstDatagrid") dt.Columns.Add("Passed?") dt.LoadDataRow(New Object() {"Yes"}, True) dt.LoadDataRow(New Object() {"No"}, True) dt.LoadDataRow(New Object() {"NA"}, True) .dgTroubleshootingandResolution.DataSource = dt .dgTroubleshootingandResolution.AllowUserToAddRows = False .dgTroubleshootingandResolution.Columns.Remove("Passed?") Dim cmb As New DataGridViewComboBoxColumn With cmb .Items.Add("Yes") .Items.Add("No") .Items.Add("NA") .DataPropertyName = "Passed?" .HeaderText = "Passed?" .Name = "Passed?" End With .dgTroubleshootingandResolution.Columns.Add(cmb)
dt.Columns("Passed?").DefaultValue = "No"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)