Completed
Last Updated: 01 Dec 2015 08:21 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 06 Nov 2015 07:43
Category:
Type: Bug Report
0
FIX. RadDropDownList - when setting the MaxDropDownItems property to 1, two items are shown in the dropdown
To reproduce:

for (int i = 0; i < 50; i++)
{
    this.radDropDownList1.Items.Add("Item" + i); 
}
this.radDropDownList1.MaxDropDownItems = 1;


Note: in the MS ComboBox it is possible to display one item in the popup:
this.comboBox1.IntegralHeight = false;
this.comboBox1.MaxDropDownItems = 1;


Workaround: adjust the size of the popup:

 private void radDropDownList1_PopupOpened(object sender, EventArgs e)
 {
     this.radDropDownList1.DropDownMaxSize = new Size(this.radDropDownList1.Width, 20);
     this.radDropDownList1.Popup.MaximumSize = this.radDropDownList1.DropDownMaxSize;
     this.radDropDownList1.Popup.MinimumSize = this.radDropDownList1.Popup.MaximumSize;
     this.radDropDownList1.DropDownListElement.ListElement.VScrollBar.FirstButton.MaxSize = new Size(20, 8);
     this.radDropDownList1.DropDownListElement.ListElement.VScrollBar.SecondButton.MaxSize = new Size(20, 8); 
 }
0 comments