New to Telerik UI for .NET MAUI? Start a free 30-day trial

.NET MAUI DataGrid Scrolling

The Telerik UI for .NET MAUI DataGrid has an internal scrolling mechanism achieved by the supported vertical and horizontal scrollbars for scrolling through its data.

Avoid nesting the DataGrid in a ScrollView and other controls that provide scrolling.

For implementing programmatic scrolling to a specific item, the DataGrid exposes the ScrollItemIntoView(object item) method, which brings the specified data item into view. Note that ScrollItemIntoView works in scenarios where the DataGrid Rows are with the same height. For more details, review the article on setting the .NET MAUI DataGrid rows.

The following example shows how to scroll to the last item of the DataGrid. The code executes on a button click.

private void Button_Clicked(object sender, System.EventArgs e)
{
    var item = this.vm.Clubs[this.vm.Clubs.Count - 1];
    this.grid.ScrollItemIntoView(item);
}

The following image shows the end result.

DataGrid Programmatic Scrolling

Additional Resources

See Also

In this article