Approved
Last Updated: 12 Feb 2018 10:50 by ADMIN
ADMIN
Dimitar
Created on: 09 Feb 2018 10:54
Category: MultiColumnCombo
Type: Bug Report
0
FIX. RadMulticolumnComboBox - the drop down is not sized correctly when the calling BestFitColumns in CellEditorInitialized
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. 

0 comments