Home Forums WinForms controls Xceed Grid for WinForms Problem with GridComboBox boxes. Reply To: Problem with GridComboBox boxes.

User (Old forums)
Member
Post count: 23064

How about this problem shouldn’t have to be worked around in the first place!

I have tried what each of you have said. No luck. Both gridcomboboxes I am using use the same table structure from the database. This is just rediculous.

Check this out, the problem still persists when I do this:
Original code with errors:
‘ Create a grid combo box for verified by
gridComboBox2.DataSource = m_dtVerifiedByEmployee
gridComboBox2.DisplayMember = “Employee”
gridComboBox2.ValueMember = “EmployeeID”
XceedPatronGrid.Columns(“VerifiedByID”).CellEditor = gridComboBox2
XceedPatronGrid.Columns(“VerifiedByID”).CellViewer = gridComboBox2

‘Create a grid combo box for verification type
gridComboBox1.DataSource = m_dtVerified
gridComboBox1.DisplayMember = “VerificationType”
gridComboBox1.ValueMember = “VerificationTypeID”
XceedPatronGrid.Columns(“VerificationTypeID”).CellEditor = gridComboBox1
XceedPatronGrid.Columns(“VerificationTypeID”).CellViewer = gridComboBox1

Changed it to this (Made the display member and value member the same as the other combo box that is working):
‘ Create a grid combo box for verified by
gridComboBox2.DisplayMember = “VerificationType”
gridComboBox2.ValueMember = “VerificationTypeID”
gridComboBox2.DataSource = m_dtVerified
XceedPatronGrid.Columns(“VerifiedByID”).CellViewer = gridComboBox2
XceedPatronGrid.Columns(“VerifiedByID”).CellEditor = gridComboBox2

‘ Create a grid combo box for verification type
gridComboBox1.DisplayMember = “VerificationType”
gridComboBox1.ValueMember = “VerificationTypeID”
gridComboBox1.DataSource = m_dtVerified
XceedPatronGrid.Columns(“VerificationTypeID”).CellEditor = gridComboBox1
XceedPatronGrid.Columns(“VerificationTypeID”).CellViewer = gridComboBox1

Notice that both gridcomboboxes are using the same datasource, displaymember, and valuemembers. The VerificationTypeID column displays the right way, and teh VerifiedByID doesn’t still. So we can eliminate the datasources for the grid combo boxes as being the cause.

This is a huge problem for me as my deadline approaches.

Imported from legacy forums. Posted by hellswraith (had 493 views)