Question DGV ComboBox Problem

dfenton21

Member
Joined
Apr 26, 2011
Messages
20
Programming Experience
Beginner
I have an unusual problem with a DGV. I have DGV with it's datasource set to a table retrieved from a database. After I set the datasource, I programatically add a combobox column to the grid. Everything works fine on my PC, but on the client's PC, when I click the drop down arrow, the values in all the other cells in that row disappear. This only happens on the client's PC which has the same version of .NET installed and the same OS.

Can anyone offer advice on how to remedy this?
Thanks.

VB.NET:
        dgvAttendence.DataSource = Bookings.PopulateDgvAttendence(iSelectedSession)

        Dim NewColumn As New DataGridViewComboBoxColumn() 'Declare new DGV CC

        With NewColumn 'Set Properties
            .DataPropertyName = "colAttendence" 'Name
            .Name = "colAttendence" 'Name
            .HeaderText = "Attendence" 'Heading
            .DropDownWidth = 160 'Width Of DropDown Box
            .Width = 90 'Display Width
            .MaxDropDownItems = 6 'How Many Items To Drop Down At A Time
            .ReadOnly = False
            .Items.Add("Attended") 'Add Some Text Items
            .Items.Add("No Show")
            .Items.Add("Arrived Late, Attended")
            .Items.Add("Arrived Late, Did Not Attend")
            .Items.Add("Attended, Not Booked")
        End With

        dgvAttendence.Columns.Add(NewColumn) 'Add The Column

        dgvAttendence.Columns(0).Visible = False
        dgvAttendence.Columns(1).ReadOnly = True
        dgvAttendence.Columns(2).ReadOnly = True
        dgvAttendence.EditMode = DataGridViewEditMode.EditOnEnter
 
Back
Top