Home Forums WinForms controls Xceed Grid for WinForms How to display "yes" or "no" instead of boolean in vb Reply To: How to display "yes" or "no" instead of boolean in vb

User (Old forums)
Member
Post count: 23064

You don’t need 2 different GridComboBoxes, you can use 1 as both CellViewer and CellEditor. You also don’t have to add it to the Controls-collection of the gridcontrol, and you don’t need to wrap the viewer inside a ControlViewer-object.
A modified version:

ArrayList refTypeAL = new ArrayList();
refTypeAL.Add(new DictionaryEntry(“1”, “Yes”));
refTypeAL.Add(new DictionaryEntry(“0”, “No”));

Xceed.Grid.Editors.GridComboBox combo = new Xceed.Grid.Editors.GridComboBox();

combo.DataSource = refTypeAL;
combo.ValueMember = “Key”;
combo.DisplayMember = “Value”;

grid.Columns[“myColumn”].CellEditor = combo;
grid.Columns[“myColumn”].CellViewer = combo;

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