Dear Telerik support team,
I have a RadGridView with more than 1 groups headers. When I use Page-Up, Page-Down key control to navigate inside the grid, the scroll height doesn't take in account the height of grouping headers. So that, while pressed on PageDown, the scroll goes to the middle of the next "page".
I attached a scenario as below:
1. When I'm in the first row of grid (see image: Before_PageDown.png), if I put on "Page Down" key, I expect the selection cursor goes to line "10916" (the last line of my viewport).
2. However, in reality, when I pressed on Page Down, it goes to line "10353" (see image: After_PageDown.png),
Many thanks for your help!
4 Answers, 1 is accepted
Hello,
Thank you for the provided images.
The behavior you described is expected as indeed, the RadGridView control takes into account the number of items that can be held in the viewport and moves the current item based on this value.
If you want to disregard the number of items and scroll the whole height of the viewport, you can create a custom KeyboardCommandProvider and override this default logic.
For your convenience, I've prepared a small sample project which demonstrates this approach. Please have a look and let me know if this would work for you.
Regards,
Dilyan Traykov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Hi Dilyan,
Many thanks for your very useful help.
The scroll works for me.
However, I also need select a nearest row where the scroll goes to. Do you have any idea how to realize that?
Many thanks,
Hello,
You will need to calculate the index of the new item based on the number of rows in the viewport. Here's an example of how you can achieve this:
if (key == Key.PageDown || key == Key.PageUp)
{
commandsToExecute.Clear();
var scrollViewer = this.parentGrid.ChildrenOfType<GridViewScrollViewer>().First();
var height = scrollViewer.ViewportHeight;
var coef = key == Key.PageDown ? 1 : -1;
scrollViewer.ScrollToVerticalOffset(scrollViewer.VerticalOffset + (height * coef));
int rowCount = (int)(height / this.parentGrid.RowHeight);
var groupRows = this.parentGrid.ChildrenOfType<GroupHeaderRow>().Where(r => r.ActualHeight > 0).Count();
var currentIndex = this.parentGrid.Items.IndexOf(this.parentGrid.CurrentItem);
var newItem = this.parentGrid.Items[currentIndex + rowCount - groupRows];
this.parentGrid.CurrentItem = newItem;
}
Regards,
Dilyan Traykov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
