VirtualGrid Class

Represents a virtual grid component that supports virtualization for large datasets.

Inheritance

Object

ComponentBase

Spreadsheet.VirtualGrid

Implements

IComponent

IHandleEvent

IHandleAfterRender

Spreadsheet.IVirtualGridContext

Inherited Members

ComponentBase.OnInitialized

ComponentBase.OnInitializedAsync

ComponentBase.OnParametersSet

ComponentBase.OnParametersSetAsync

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class VirtualGrid : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, Spreadsheet.IVirtualGridContext

Constructors

VirtualGridlink

Initializes a new instance of the VirtualGrid class.

Declaration
public VirtualGrid()

Properties

AdditionalAttributeslink

Gets or sets additional attributes that will be rendered in the root element of the virtual grid.

Declaration
public IReadOnlyDictionary<string, object> AdditionalAttributes { get; set; }
Property Value
Type Description
IReadOnlyDictionary<string, object>Gets or sets additional attributes that will be rendered in the root element of the virtual grid.

ChildContentlink

Gets or sets additional child content that will be rendered inside the virtual grid.

Declaration
public RenderFragment<Spreadsheet.IVirtualGridContext> ChildContent { get; set; }
Property Value
Type Description
RenderFragment<Spreadsheet.IVirtualGridContext>Gets or sets additional child content that will be rendered inside the virtual grid.

ScrollLeftlink

Returns the current horizontal scroll position of the virtual grid.

Declaration
public double ScrollLeft { get; }
Property Value
Type Description
doubleReturns the current horizontal scroll position of the virtual grid.

ScrollToplink

Returns the current vertical scroll position of the virtual grid.

Declaration
public double ScrollTop { get; }
Property Value
Type Description
doubleReturns the current vertical scroll position of the virtual grid.

SplitterSizelink

Gets or sets splitter size in pixels. The splitter is used to separate frozen and non-frozen rows and columns.

Declaration
public double SplitterSize { get; set; }
Property Value
Type Description
doubleGets or sets splitter size in pixels. The splitter is used to separate frozen and non-frozen rows and columns.

Templatelink

Gets or sets the template used to render each virtual item in the grid.

Declaration
public RenderFragment<Spreadsheet.VirtualItem> Template { get; set; }
Property Value
Type Description
RenderFragment<Spreadsheet.VirtualItem>Gets or sets the template used to render each virtual item in the grid.

Viewlink

Gets or sets the sheet view that provides rendering state and access to the document model.

Declaration
public Spreadsheet.SheetView View { get; set; }
Property Value
Type Description
Spreadsheet.SheetViewGets or sets the sheet view that provides rendering state and access to the document model.

Methods

BuildRenderTreelink

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

GetRangeslink

Declaration
public IEnumerable<Spreadsheet.RangeInfo> GetRanges(Documents.Spreadsheet.RangeRef range)
Parameters
Type Name Description
Documents.Spreadsheet.RangeRef range
Returns
Type Description
IEnumerable<Spreadsheet.RangeInfo>

GetRectanglelink

Declaration
public Spreadsheet.PixelRectangle GetRectangle(int top, int left)
Parameters
Type Name Description
int top
int left
Returns

GetRectanglelink

Declaration
public Spreadsheet.PixelRectangle GetRectangle(int top, int left, int bottom, int right)
Parameters
Type Name Description
int top
int left
int bottom
int right
Returns

OnAfterRenderAsynclink

Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type Name Description
bool firstRender
Returns
Type Description
Task

OnResizelink

Invoked by JS interop to notify the component about resize events in the virtual grid.

Declaration
public void OnResize(double width, double height)
Parameters
Type Name Description
double width
double height

OnScrolllink

Invoked by JS interop to notify the component about scroll events in the virtual grid.

Declaration
public void OnScroll(double scrollX, double scrollY)
Parameters
Type Name Description
double scrollX
double scrollY

ScrollToAsynclink

Scrolls the virtual grid to the specified row and column asynchronously, ensuring that the specified cell is visible within the viewport.

Declaration
public Task ScrollToAsync(int row, int column)
Parameters
Type Name Description
int row
int column
Returns
Type Description
Task

SetParametersAsynclink

Declaration
public override Task SetParametersAsync(ParameterView parameters)
Parameters
Type Name Description
ParameterView parameters
Returns
Type Description
Task

Events

Scrolledlink

Declaration
public event Action Scrolled
An error has occurred. This app may no longer respond until reloaded. Reload 🗙