Class Sheet
Inheritance
Namespace: Syncfusion.Blazor.Spreadsheet
Assembly: Syncfusion.Blazor.dll
Syntax
public class Sheet : ComponentBase
Constructors
Sheet()
Declaration
public Sheet()
Properties
ActiveCell
Gets the active cell in the active sheet. The active cell refers to the currently selected or focused cell in the sheet.
Declaration
public string ActiveCell { get; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the active cell's address. The default value is "A1", which corresponds to the first cell in the sheet. |
Remarks
The ActiveCell
property dynamically changes based on user interactions such as keyboard navigation, mouse clicks, or cell selection.
- For
single cell selection
, the active cell is the selected cell. - For
multiple cell selection or drag selection
, the first selected cell in the range becomes the active cell. For example, selecting a range from B100 to I100 will set the active cell to B100. - For
column selection
(clicking a column header), the first cell of the selected column becomes the active cell. For example, selecting column E sets E1 as the active cell. - For
multiple column selection
, the first cell in the first selected column is the active cell, similar to the behavior in multiple cell selection. - For
row selection
andshift key selection
, the first selected row or cell is the active cell.
ColumnCount
Gets the number of columns in the sheet.
Declaration
public int ColumnCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | An System.Int32 representing the total number of columns rendered in the sheet. The default value is 200. |
Remarks
This property defines the number of columns that are rendered in the sheet. Although the property has an internal setter, it is read-only for users and cannot be directly modified.
- The default number of columns is 200. However, this count may dynamically increase based on user interactions. For example, if the user provides a data source with 500 columns, the
ColumnCount
will return 500. - When
deleting columns
, the column count does not decrease. The columns values are cleared, but the overall count remains the same. - When
adding columns
, the new columns are reflected in the total column count. - When
hiding columns
, the column count remains unchanged. Even if all 200 columns are hidden, no new columns are added unless explicitly added by the user.
Columns
Gets or sets the list of columns in the sheet.
Declaration
public List<SpreadsheetColumn> Columns { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<Syncfusion.Blazor.Spreadsheet.Internal.SpreadsheetColumn> |
DataSource
Gets or sets the data source for the sheet.
Declaration
public IEnumerable<object> DataSource { get; set; }
Property Value
Type |
---|
System.Collections.Generic.IEnumerable<System.Object> |
ID
Gets or sets the ID of the sheet.
Declaration
public int ID { get; set; }
Property Value
Type |
---|
System.Int32 |
Name
Gets or sets the name of the sheet.
Declaration
public string Name { get; set; }
Property Value
Type |
---|
System.String |
RowCount
Gets the number of rows in the sheet.
Declaration
public int RowCount { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | An System.Int32 representing the total number of rows rendered in the sheet. The default value is 1000. |
Remarks
This property defines the number of rows that are rendered in the sheet. Although the property has an internal setter, it is read-only for users and cannot be directly modified.
- The default number of rows is 1000. However, this count may dynamically increase based on user actions. For example, if the user provides a data source with 2000 rows, the
RowCount
will return 2000. - When
deleting rows
, the row count does not decrease. The values within the deleted rows are cleared, but the overall row count remains unchanged. - When
adding rows
, the new rows are reflected in the total row count. - When
hiding rows
, the row count remains the same. Even if all 1000 rows are hidden, no additional rows are added unless explicitly added by the user.
Rows
Gets or sets the list of rows in the sheet.
Declaration
public List<Row> Rows { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<Row> |
SelectedRange
Gets or sets the selected range in the sheet.
Declaration
public string SelectedRange { get; set; }
Property Value
Type |
---|
System.String |
SheetRows
Gets or sets the collection of rows and their properties.
Declaration
public List<SheetRow> SheetRows { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<SheetRow> | A list of SheetRow objects representing the rows in the sheet. This property is used to render custom rows in the sheet, including header and footer rows. |
Remarks
The SheetRows
property allows you to configure and access the rows within a sheet. This property is essential for rendering custom rows, which can include headers, footers, and other custom content.
ShowHeader
Gets or sets a value indicating whether to show the header in the sheet.
Declaration
public bool ShowHeader { get; set; }
Property Value
Type |
---|
System.Boolean |
StartIndex
Gets or sets the start index of the sheet.
Declaration
public string StartIndex { get; set; }
Property Value
Type |
---|
System.String |
State
Gets or sets the state of the sheet.
Declaration
public string State { get; set; }
Property Value
Type |
---|
System.String |
TopLeftCell
Gets or sets the top left cell in the sheet.
Declaration
public string TopLeftCell { get; set; }
Property Value
Type |
---|
System.String |
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 |