Completed
Last Updated: 04 Jun 2021 09:38 by ADMIN
Release R2 2021 SP1 (LIB 2021.2.607)
Arash
Created on: 22 Apr 2021 15:58
Category: GridView
Type: Bug Report
0
RadGridView: ScrollToRow() doesn't work on a paged RadGridView that is on another tab
I have three grids.

Two of the grids (B & C) are on the same tab and the other (A) on a different tab.

Only one tab can be visible at any one time, so you can either see and interact with the single grid (A) or the other two grids (B & C).

I need to be able to select a row in C (based on a criteria) when you click on a row in A or B.

Grid C has paging enabled.

I can successfully select the desired row in C when I click on a row in B and see the paging change to show the selected row.

But, when I click on a row in A and find a matching row in C, the row seems to get selected but the paging does not move to where the selected row is.
1 comment
ADMIN
Nadya | Tech Support Engineer
Posted on: 22 Apr 2021 16:02

Hi, Arash,

You can use the following workaround:

private void FindAndSelectRow()
{
    foreach (GridViewRowInfo r in radGridView3.Rows)
    {
        if (r.Cells["ItemProperty"].Value.ToString() == "string 20")
        {
            r.IsSelected = true;
            r.IsCurrent = true;
            //workarund
            int pageIndex = radGridView3.MasterView.ViewTemplate.DataView.GetItemPage(r);
            radGridView3.MasterView.ViewTemplate.DataView.MoveToPage(pageIndex);
            radGridView3.TableElement.ScrollToRow(r);
            break;
        }
    }
}

Regards,
Nadya
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Attached Files: