Completed
Last Updated: 20 Mar 2014 07:11 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 04 Dec 2013 03:48
Category: MultiColumnCombo
Type: Bug Report
3
FIX. - RadMultiColumnComboBox popup grid does not fill the entire height of the dropdown
Description: RadMultiColumnComboBox popup grid does not fill the entire height of the dropdown if the dropdown is sized to be wider than the RadMultiColumnComboBox.

To reproduce: - add two RadMultiColumnComboBoxes and use the following code: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.radMultiColumnComboBox1.Size = new System.Drawing.Size(172, 20); this.radMultiColumnComboBox2.Size = new System.Drawing.Size(334, 20); Load += Form1_Load; } void InitCombo(RadMultiColumnComboBox combo) { combo.EditorControl.MasterTemplate.AutoGenerateColumns = false; string filterFieldName = "Initials"; string name = "Name"; string displayFieldName = "InitialsPlusName"; combo.EditorControl.Columns.Add(new GridViewTextBoxColumn(filterFieldName) { Width = 60, HeaderText = "Initials" }); combo.EditorControl.Columns.Add(new GridViewTextBoxColumn(name) { Width = 200, HeaderText = "Name" }); combo.EditorControl.Columns.Add(new GridViewTextBoxColumn(displayFieldName) { IsVisible = false }); List<TempData> data = new List<TempData>(); for (int idx = 1; idx < 30; idx++) { data.Add(new TempData() { Id = idx, Name = idx.ToString(), Initials = idx.ToString() }); } combo.DataSource = data; combo.DisplayMember = displayFieldName; combo.ValueMember = "Id"; combo.AutoFilter = true; FilterDescriptor filter = new FilterDescriptor { PropertyName = filterFieldName, Operator = FilterOperator.StartsWith }; combo.EditorControl.MasterTemplate.FilterDescriptors.Add(filter); combo.EditorControl.MasterTemplate.EnableAlternatingRowColor = true; combo.EditorControl.ShowRowHeaderColumn = false; combo.MultiColumnComboBoxElement.DropDownAnimationEnabled = false; combo.MultiColumnComboBoxElement.DropDownWidth = 278; combo.MultiColumnComboBoxElement.DropDownHeight = 238; } void Form1_Load(object sender, EventArgs e) { InitCombo(radMultiColumnComboBox1); InitCombo(radMultiColumnComboBox2); } } public class TempData { public int Id { get; set; } public string Initials { get; set; } public string Name { get; set; } public string InitialsPlusName { get { return Initials + " " + Name; } } }

Workaround: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.radMultiColumnComboBox1.Size = new System.Drawing.Size(172, 20); this.radMultiColumnComboBox2.Size = new System.Drawing.Size(334, 20); Load += Form1_Load; } void InitCombo(RadMultiColumnComboBox combo) { combo.EditorControl.MasterTemplate.AutoGenerateColumns = false; string filterFieldName = "Initials"; string name = "Name"; string displayFieldName = "InitialsPlusName"; combo.EditorControl.Columns.Add(new GridViewTextBoxColumn(filterFieldName) { Width = 60, HeaderText = "Initials" }); combo.EditorControl.Columns.Add(new GridViewTextBoxColumn(name) { Width = 200, HeaderText = "Name" }); combo.EditorControl.Columns.Add(new GridViewTextBoxColumn(displayFieldName) { IsVisible = false }); List<TempData> data = new List<TempData>(); for (int idx = 1; idx < 30; idx++) { data.Add(new TempData() { Id = idx, Name = idx.ToString(), Initials = idx.ToString() }); } combo.DataSource = data; combo.DisplayMember = displayFieldName; combo.ValueMember = "Id"; combo.AutoFilter = true; FilterDescriptor filter = new FilterDescriptor { PropertyName = filterFieldName, Operator = FilterOperator.StartsWith }; combo.EditorControl.MasterTemplate.FilterDescriptors.Add(filter); combo.EditorControl.MasterTemplate.EnableAlternatingRowColor = true; combo.EditorControl.ShowRowHeaderColumn = false; combo.DropDownOpening += combo_DropDownOpening; } private void combo_DropDownOpening(object sender, CancelEventArgs args) { RadMultiColumnComboBox combo = sender as RadMultiColumnComboBox; if (combo != null) { combo.MultiColumnComboBoxElement.DropDownHeight = 238; combo.MultiColumnComboBoxElement.DropDownWidth = 278; combo.MultiColumnComboBoxElement.DropDownAnimationEnabled = false; combo.MultiColumnComboBoxElement.EditorControl.Height = 238; } } void Form1_Load(object sender, EventArgs e) { InitCombo(radMultiColumnComboBox1); InitCombo(radMultiColumnComboBox2); radMultiColumnComboBox1.MultiColumnComboBoxElement.ShowPopup(); radMultiColumnComboBox1.MultiColumnComboBoxElement.ClosePopup(); radMultiColumnComboBox2.MultiColumnComboBoxElement.ShowPopup(); radMultiColumnComboBox2.MultiColumnComboBoxElement.ClosePopup(); } } public class TempData { public int Id { get; set; } public string Initials { get; set; } public string Name { get; set; } public string InitialsPlusName { get { return Initials + " " + Name; } } }
0 comments