To reproduce:
- Add a GridViewMultiComboBoxColumn to a grid with wide columns.
- Call the following code in the CellEditorInitialized event handler
editor.EditorControl.LoadElementTree();
editor.AutoSizeDropDownHeight = true;
editor.AutoSizeDropDownColumnMode = BestFitColumnMode.AllCells;
editor.BestFitColumns(true, true);
- The drop down still has a horizontal scrollbar.
Workaround:
editor.EditorControl.BestFitColumns(BestFitColumnMode.AllCells);
int desiredWidth = 0;
foreach (GridViewColumn column in editor.EditorControl.TableElement.ViewElement.RowLayout.RenderColumns)
{
desiredWidth += column.Width + editor.EditorControl.TableElement.CellSpacing;
desiredWidth -= editor.EditorControl.TableElement.CellSpacing;
}
editor.DropDownWidth = desiredWidth + 20;//20 in case the vertical scroll appears.