Home › Forums › WinForms controls › Xceed Grid for WinForms › trouble using GridComboBox as CellViewer › Reply To: trouble using GridComboBox as CellViewer
I should also mention that we are using version 2.5 of the grid.
I downloaded version 3.x of the grid today and was able to get the functionality working using the below code.
// Create the combo’s for edit and view (
Xceed.Grid.Editors.GridComboBox editCombo = CreateOutcomeEditor();
// set the view as the combo box only if the control is enabled ie they user is able to update the grid
if(!ucAssistance.ReadOnly)
{
// create and assign CellEditorManager class to the column
this.ucAssistance.Columns[2].CellEditorManager = new Xceed.Grid.Editors.CellEditorManager(editCombo,”Text”,true, true);
// clone the template control for use in the cell viewer
Control cloneCombo = Xceed.UI.ThemedControl.CloneControl(this.ucAssistance.Columns[2].CellEditorManager.TemplateControl);
// create and assign CellViewerManager class to the column
this.ucAssistance.Columns[2].CellViewerManager = new Xceed.Grid.Viewers.CellViewerManager(cloneCombo, “Text”);
}
this still doesn’t help me as the we are not able to use version 3 of the .Net grid for this release. ;-(
any ideas?
Cheers
Adam
Imported from legacy forums. Posted by RayMartinsHair (had 583 views)