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

.NET MAUI DataGrid LoadOnDemand Event

Updated on Sep 28, 2026

You can load new items in the DataGrid by using the LoadOnDemand event. The LoadOnDemand event handler receives the following parameters:

  • The sender argument, which is of type object, but can be cast to the RadDataGrid type.
  • A LoadOnDemandEventArgs object, which provides the IsDataLoaded (bool) property, indicating whether the data is loaded.

Example

The following example demonstrates a sample setup that shows how to use the event:

  1. Define the DataGrid in XAML:
XAML
<telerik:RadDataGrid x:Name="dataGrid"
                     ItemsSource="{Binding Items}"
                     LoadOnDemand="dataGrid_LoadOnDemand"
                     LoadOnDemandMode="Automatic"
                     LoadOnDemandBufferItemsCount="{Binding Source={x:Reference slider}, Path=Value}"/>
  1. Add the telerik namespace:
xaml
xmlns:telerik="http://schemas.telerik.com/2022/xaml/maui"
  1. Add sample data:
C#
public class Person
{
    public string Name { get; set; }
    public int Age { get; set; }
    public Gender Gender { get; set; }
}
  1. Define the ViewModel:
C#
public class LoadOnDemandEventViewModel
{
    public LoadOnDemandEventViewModel()
    {
        this.Items = new ObservableCollection<Person>();

        for (int i = 0; i < 20; i++)
        {
            var person = new Person { Name = "Person " + i, Age = i + 18, Gender = i % 2 == 0 ? Gender.Male : Gender.Female };
            this.Items.Add(person);
        }
        
    }

    public ObservableCollection<Person> Items { get; set; }
}
  1. Handle the LoadOnDemand event:
C#
private void dataGrid_LoadOnDemand(object sender, Telerik.Maui.Controls.DataGrid.LoadOnDemandEventArgs e)
{
    for (int i = 0; i < 15; i++)
    {
        ((sender as RadDataGrid).ItemsSource as ObservableCollection<Person>).Add(new Person() { Name = "Person " + i, Age = i + 18, Gender = i % 2 == 0 ? Gender.Male : Gender.Female });
    }
    e.IsDataLoaded = true;
}

For DataGrid LoadOnDemand event example, refer to the SDKBrowser Demo application and go to the DataGrid > LoadOnDemand category.

See Also

In this article
ExampleSee Also
Not finding the help you need?
Contact Support