Completed
Last Updated: 07 Apr 2016 12:43 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 23 Oct 2014 13:09
Category: GridView
Type: Bug Report
2
FIX. RadGridView - incorrect vertical scroll bar and selected row when scrolling quickly and the AutoSizeRows property is set to true
When scrolling to the bottom of the grid with the mouse, the last row is not lined up with the bottom of the grid. Also, when doing this, clicking on any row, leads to row jumping down to align properly, but a different row is selected.

Workaround:

public Form1()
{
    InitializeComponent();
    radGridView1.MouseDown+=radGridView1_MouseDown;
    radGridView1.MouseUp+=radGridView1_MouseUp;
}
bool scrolling = false;

private void radGridView1_MouseDown(object sender, MouseEventArgs e)
{
    ScrollBarThumb thumb = radGridView1.ElementTree.GetElementAtPoint(e.Location) as ScrollBarThumb;
    if (thumb != null)
    {
        scrolling = true;
    }
}

private void radGridView1_MouseUp(object sender, MouseEventArgs e)
{
    if (scrolling)
    {
        scrolling = false;
        int scrollBarValue = radGridView1.TableElement.VScrollBar.Value;
        radGridView1.MasterTemplate.Refresh();
        radGridView1.TableElement.VScrollBar.Value = scrollBarValue;
    }
}
Attached Files:
0 comments