Home Forums WinForms controls Xceed Grid for WinForms trouble using GridComboBox as CellViewer Reply To: trouble using GridComboBox as CellViewer

User (Old forums)
Member
Post count: 23064

You’ll have to bind the GridComboBox to a DataSource, and set the DisplayMember and ValueMember, like this:<code>GridComboBox combo = new GridComboBox();
combo.DataSource = ds;
combo.DisplayMember = “X”;
combo.ValueMember = “Y”;
detail.Columns[0].CellViewer = combo;</code>DisplayMember is the name of the field that is displayed by the viewer, ValueMember is the name of the field that represents the value of the Cell.

Imported from legacy forums. Posted by Tommy (had 116 views)