Approved
Last Updated: 01 Jun 2018 09:28 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 18 May 2015 06:48
Category:
Type: Bug Report
1
FIX. RadDropDownList - scrolling is broken when the AutoSizeItems property is set to true and the an item with empty string exists
To reproduce: use the following code snippet:

public Form1()
{
    InitializeComponent();
    this.radDropDownList1.AutoSizeItems = true;
    this.radDropDownList1.VisualListItemFormatting += radDropDownList1_VisualListItemFormatting;
    PopulateList();
}

private void radDropDownList1_VisualListItemFormatting(object sender, VisualItemFormattingEventArgs args)
{
    args.VisualItem.BorderBoxStyle = BorderBoxStyle.FourBorders;
    args.VisualItem.BorderTopWidth = 0;
    args.VisualItem.BorderLeftWidth = 0;
    args.VisualItem.BorderRightWidth = 0;
    args.VisualItem.BorderBottomWidth = 0;
}

public void PopulateList()
{
    for (int x = 0; x < 20; x++)
    {
        if (x == 0)
        {
            radDropDownList1.Items.Add(new RadListDataItem(string.Empty));
        }
        radDropDownList1.Items.Add(new RadListDataItem("Item" + x));
    }
}

private void radButton1_Click(object sender, EventArgs e)
{
    this.radDropDownList1.Items.Clear();
    PopulateList();
}

1. Open the drop-down and scroll.
2. Close the popup.
3. Click the button.
4. Open the drop-down again and try to scroll.

Workaround:

private void radDropDownList1_VisualListItemFormatting(object sender, VisualItemFormattingEventArgs args)
{
    args.VisualItem.BorderColor = Color.Transparent;
}
Attached Files:
0 comments