Completed
Last Updated: 29 Oct 2015 08:26 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 14 Oct 2015 08:05
Category: GridView
Type: Bug Report
0
FIX. RadGridView - ScrollToRow does not navigate to the correct row when AutoSizeRows is set to true
To reproduce:

1. Use the following code:
private void Form1_Load(object sender, EventArgs e)
{
    this.customersTableAdapter.Fill(this.nwindDataSet.Customers);

    this.radGridView1.DataSource = customersBindingSource;
    this.radGridView1.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill;
    this.radGridView1.CellEndEdit += radGridView1_CellEndEdit;
    this.radGridView1.AutoSizeRows = true;
    SortDescriptor descriptor = new SortDescriptor();
    descriptor.PropertyName = "Country"; 
    descriptor.Direction = ListSortDirection.Ascending;
    this.radGridView1.MasterTemplate.SortDescriptors.Add(descriptor);
}

void radGridView1_CellEndEdit(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
    int selectedRowIndex = this.radGridView1.ChildRows.IndexOf(this.radGridView1.CurrentRow);
    this.radGridView1.TableElement.ScrollToRow(selectedRowIndex);
}

2. Modify cell value in the sorted column. After the editor value is confirmed by pressing Enter, you scroll to the current column. However, you do not observe the expected behavior.

Workaround: set the AutoSizeRows property to false.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments