Declined
Last Updated: 26 Jun 2015 10:57 by ADMIN
ADMIN
Dimitar
Created on: 12 Aug 2014 07:19
Category: GridView
Type: Bug Report
0
FIX. RadGridView - GridViewMultiComboBoxColumn when AutoSizeDropDownToBestFit is set to true the drop down size is not calculated properly.
To reproduce:
- Add two  GridViewMultiComboBoxColumns with different number of columns to a grid.
- set AutoSizeDropDownToBestFit to true in the CellEditorInitialized event.
- Start the project and open the drop down for the first column and then for the second.
- You will notice that the second time the drop down size is not calculated properly.

Workaround:
void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    RadMultiColumnComboBoxElement el = e.ActiveEditor as RadMultiColumnComboBoxElement;
    
    if (el != null)
    {
        FieldInfo propertyInfo = el.GetType().GetField("savedColumnsWidth", BindingFlags.NonPublic | BindingFlags.Instance);
        propertyInfo.SetValue(el, -1);
             
        el.AutoSizeDropDownToBestFit = true;
    }
}
1 comment
ADMIN
Ralitsa
Posted on: 26 Jun 2015 10:57
The issue is duplicated with another item and both are merged into FIX. RadGridView - RadMultiColumnComboBoxElement does not always bestfit the columns when the AutoSizeDropDownToBestFit is set to true http://feedback.telerik.com/Project/154/Feedback/Details/144262-fix-radgridview-radmulticolumncomboboxelement-does-not-always-bestfit-the-colu