If the column is a string, you only need to set the CellEditorManager, but when it is a numeric one, you need to also set the CellViewerManager.
WinComboBox box = new WinComboBox(northwindDataSet, “Suppliers”, “SupplierID”, “%CompanyName%” );
ComboBoxEditor cboEditor = new ComboBoxEditor( box );
ComboBoxViewer cboViewer = new ComboBoxViewer( box );
“SupplierID” ].CellEditorManager = cboEditor;
“SupplierID” ].CellViewerManager = cboViewer;
The DisplayFormat property is for the TextBox portion of the ComboBox. To change the dropdown display, you need to set the visible property to false for each column you don’t want to display.
foreach( ColumnInfo col in cboEditor.TemplateControl.Columns )
if( col.Name != “CompanyName” )
Imported from legacy forums. Posted by André (had 785 views)