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

That solution works very nicely. But what about this… 😉

Your datagrid is bound to a datatable. And in my case the DataFieldValue is an Id to mantian referential integrity. And I don’t really like using strings for my id columns.

So DataField1 is bound to a column in a datatable of type System.Int

Solution (Though painfull)

Create a two columns. One bound and one unbound.
Column 1(invisible) is bound to the datatable column
Column2(visible) is unbound and of type System.String

Column1 has default cell view and editors.
Column2 will use GridComboBox1 for view and edit.

(Fun part)
When the value of Column2 changes, set the value of Column1

(When the grid is done loading)
Populate column2

viola

It works but there has to be a better way

ACanadian

Imported from legacy forums. Posted by ACanadian (had 289 views)