ClassTelerikSpreadsheet
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class TelerikSpreadsheet : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikSpreadsheet
Implements:
Inherited Members
Constructors
TelerikSpreadsheet()
Declaration
public TelerikSpreadsheet()
Properties
ColumnHeaderHeight
Sets the height of the column headers in pixels. Example: ColumnHeaderHeight = 24
.
Declaration
[Parameter]
public double ColumnHeaderHeight { get; set; }
Property Value
ColumnWidth
Sets the default width of columns in pixels. Example: ColumnWidth = 80
. Changing this affects all columns unless overridden per column.
Declaration
[Parameter]
public double ColumnWidth { get; set; }
Property Value
ColumnsCount
Sets the number of columns in each sheet. Example: ColumnsCount = 100
. Increasing this value may impact performance for very large sheets.
Data
Provides the file data to load into the Spreadsheet. Set this to a valid Excel file byte array to open a file programmatically. Example: Data = myFileBytes
.
EnableLoaderContainer
Shows a loading indicator during long-running operations, such as file import or export. Set to false
to disable the loader. Example: EnableLoaderContainer = false
.
Declaration
[Parameter]
public bool EnableLoaderContainer { get; set; }
Property Value
Height
Sets the height of the Spreadsheet component. Accepts CSS values such as "600px" or "100%". Example: Height = "400px"
.
OnDownload
Fires when a file is downloaded from the Spreadsheet. Use to handle custom logic after file export. Example: OnDownload = EventCallback.Factory.Create(this, OnSpreadsheetDownload)
.
Declaration
[Parameter]
public EventCallback<SpreadsheetDownloadEventArgs> OnDownload { get; set; }
Property Value
OnOpen
Fires when a file is opened in the Spreadsheet. Use to handle custom logic after file load. Example: OnOpen = EventCallback.Factory.Create(this, OnSpreadsheetOpen)
.
Declaration
[Parameter]
public EventCallback<SpreadsheetOpenEventArgs> OnOpen { get; set; }
Property Value
RowHeaderWidth
Sets the width of the row headers in pixels. Example: RowHeaderWidth = 40
.
Declaration
[Parameter]
public double RowHeaderWidth { get; set; }
Property Value
RowHeight
Sets the default height of rows in pixels. Example: RowHeight = 24
. Required for some features such as virtual scrolling.
Declaration
[Parameter]
public double RowHeight { get; set; }
Property Value
RowsCount
Sets the number of rows in each sheet. Example: RowsCount = 500
. Large values may affect performance.
Tools
Configures the visible toolbars and tools in the Spreadsheet. Use All for all tools or customize with a SpreadsheetToolSet. Example: Tools = SpreadsheetToolSets.All
.
Declaration
[Parameter]
public SpreadsheetToolSet Tools { get; set; }
Property Value
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
Overrides
Dispose()
Declaration
public override void Dispose()
Overrides
ExportToExcelAsync()
Exports the Spreadsheet to raw data.
Rebind()
Updates the component and processes the latest file data.
Declaration
public void Rebind()