Represents a virtual grid component that supports virtualization for large datasets.
Object
ComponentBase
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
public class VirtualGrid : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender, Spreadsheet.IVirtualGridContextInitializes a new instance of the VirtualGrid class.
public VirtualGrid()Gets or sets additional attributes that will be rendered in the root element of the virtual grid.
public IReadOnlyDictionary<string, object> AdditionalAttributes { get; set; }
| Type | Description |
|---|---|
| IReadOnlyDictionary<string, object> | Gets or sets additional attributes that will be rendered in the root element of the virtual grid. |
Gets or sets additional child content that will be rendered inside the virtual grid.
public RenderFragment<Spreadsheet.IVirtualGridContext> ChildContent { get; set; }
| Type | Description |
|---|---|
| RenderFragment<Spreadsheet.IVirtualGridContext> | Gets or sets additional child content that will be rendered inside the virtual grid. |
Returns the current horizontal scroll position of the virtual grid.
public double ScrollLeft { get; }
| Type | Description |
|---|---|
| double | Returns the current horizontal scroll position of the virtual grid. |
Returns the current vertical scroll position of the virtual grid.
public double ScrollTop { get; }
| Type | Description |
|---|---|
| double | Returns the current vertical scroll position of the virtual grid. |
Gets or sets splitter size in pixels. The splitter is used to separate frozen and non-frozen rows and columns.
public double SplitterSize { get; set; }
| Type | Description |
|---|---|
| double | Gets or sets splitter size in pixels. The splitter is used to separate frozen and non-frozen rows and columns. |
Gets or sets the template used to render each virtual item in the grid.
public RenderFragment<Spreadsheet.VirtualItem> Template { get; set; }
| Type | Description |
|---|---|
| RenderFragment<Spreadsheet.VirtualItem> | Gets or sets the template used to render each virtual item in the grid. |
Gets or sets the sheet view that provides rendering state and access to the document model.
public Spreadsheet.SheetView View { get; set; }
| Type | Description |
|---|---|
| Spreadsheet.SheetView | Gets or sets the sheet view that provides rendering state and access to the document model. |
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
| Type | Name | Description |
|---|---|---|
| Rendering.RenderTreeBuilder | __builder |
public IEnumerable<Spreadsheet.RangeInfo> GetRanges(Documents.Spreadsheet.RangeRef range)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | range |
| Type | Description |
|---|---|
| IEnumerable<Spreadsheet.RangeInfo> |
public Spreadsheet.PixelRectangle GetRectangle(int top, int left)
| Type | Name | Description |
|---|---|---|
| int | top | |
| int | left |
| Type | Description |
|---|---|
| Spreadsheet.PixelRectangle |
public Spreadsheet.PixelRectangle GetRectangle(int top, int left, int bottom, int right)
| Type | Name | Description |
|---|---|---|
| int | top | |
| int | left | |
| int | bottom | |
| int | right |
| Type | Description |
|---|---|
| Spreadsheet.PixelRectangle |
protected override Task OnAfterRenderAsync(bool firstRender)
| Type | Name | Description |
|---|---|---|
| bool | firstRender |
| Type | Description |
|---|---|
| Task |
Invoked by JS interop to notify the component about resize events in the virtual grid.
public void OnResize(double width, double height)
| Type | Name | Description |
|---|---|---|
| double | width | |
| double | height |
Invoked by JS interop to notify the component about scroll events in the virtual grid.
public void OnScroll(double scrollX, double scrollY)
| Type | Name | Description |
|---|---|---|
| double | scrollX | |
| double | scrollY |
Scrolls the virtual grid to the specified row and column asynchronously, ensuring that the specified cell is visible within the viewport.
public Task ScrollToAsync(int row, int column)
| Type | Name | Description |
|---|---|---|
| int | row | |
| int | column |
| Type | Description |
|---|---|
| Task |
public override Task SetParametersAsync(ParameterView parameters)
| Type | Name | Description |
|---|---|---|
| ParameterView | parameters |
| Type | Description |
|---|---|
| Task |