Completed
Last Updated: 13 Oct 2015 11:17 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 06 Oct 2015 09:58
Category:
Type: Bug Report
0
FIX. RadListControl - vertical scroll-bar jumps after scrolling down and selecting an item
To reproduce:

1. Use the following code snippet:

public Form1()
{
    InitializeComponent();

    for (var x = 0; x < 1000; x++)
    {
        radListControl1.Items.Add(string.Format("i{0}", x));
    }

}

2. Select the first item and scroll down by using the mouse wheel.
3. When you click over a new item to select it, the vertical scroll-bar jumps to the top

Workaround: handle MouseDown event and change the active item
private void radListControl1_MouseDown(object sender, MouseEventArgs e)
{
    RadListVisualItem el = this.radListControl1.ListElement.ElementTree.GetElementAtPoint(e.Location) as RadListVisualItem;
    if (el!=null)
    {
        this.radListControl1.ActiveItem = el.Data;
    }
}
Attached Files:
0 comments