menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GridInfiniteScrollSettings - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class GridInfiniteScrollSettings

    Configures grid infinite scrolling.

    Inheritance
    System.Object
    GridInfiniteScrollSettings
    Namespace: Syncfusion.Blazor.Grids
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class GridInfiniteScrollSettings : OwningComponentBase

    Constructors

    GridInfiniteScrollSettings()

    Declaration
    public GridInfiniteScrollSettings()

    Properties

    EnableCache

    Gets or sets a value indicating whether the Grid will cache visited blocks of data, allowing reuse of previously loaded block data when revisiting the same block. This reduces the frequency of data requests while navigating through the same block.

    Declaration
    public bool EnableCache { get; set; }
    Property Value
    Type Description
    System.Boolean

    true to enable data caching for visited blocks; false by default.

    Remarks

    Enabling this caching mode maintains row elements in the DOM based on the MaximumBlocks count. If the number of maintained rows exceeds this limit during scrolling, the Grid removes rows from the DOM to accommodate new row elements.

    InitialBlocks

    Gets or sets the number of blocks to be initially rendered when the Grid is loaded. Each block corresponds to a page size of the Grid, resulting in the rendering of a certain number of tr elements determined by multiplying the initial block size with the page size.

    Declaration
    public int InitialBlocks { get; set; }
    Property Value
    Type Description
    System.Int32

    The default value is 3, indicating that the Grid will display three blocks, which translates to a specific number of tr elements, during the initial rendering.

    Remarks

    The InitialBlocks property determines the quantity of blocks, each equivalent to a page size, to display during the first load. Additional blocks will be dynamically loaded as the user scrolls through the Grid. For example, when the bottom of the scrollbar is reached, one block of records will be fetched and loaded to display new set of data's. If the PageSize is not explicitly provided, it will be calculated based on the viewport height to ensure an optimal user experience. The InitialBlocks size should be set greater than the viewport height to guarantee a smooth and seamless user experience.

    MaximumBlocks

    Gets or sets the number of blocks to be rendered in the Grid during scrolling when EnableCache is set to true. This caching mode optimizes performance by storing blocks in a cache for large data sets.

    Declaration
    public int MaximumBlocks { get; set; }
    Property Value
    Type Description
    System.Int32

    The default value is 3.

    Remarks

    When EnableCache is set to true, the MaximumBlocks property determines the maximum number of blocks to be kept in the cache. Exceeding this limit will remove the oldest blocks from the cache to make space for new ones.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder __builder

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved