Class SpreadsheetRibbonTab
Represents the state and metadata of a ribbon tab in the SfSpreadsheet's ribbon interface.
Inherited Members
Namespace: Syncfusion.Blazor.Spreadsheet
Assembly: Syncfusion.Blazor.Spreadsheet.dll
Syntax
public class SpreadsheetRibbonTab
Remarks
This model is used to customize built-in ribbon tabs by controlling their visibility, display order, and header text. SpreadsheetRibbonTab instances are passed to the RibbonTabItems parameter.
Examples
Example: Customizing ribbon tabs
@using Syncfusion.Blazor.Spreadsheet
@using Syncfusion.Blazor.Ribbon
<SfSpreadsheet @ref="SpreadsheetInstance"
RibbonTabItems="@GetTabCustomizations()">
</SfSpreadsheet>
@code {
public SfSpreadsheet SpreadsheetInstance { get; set; }
List<SpreadsheetRibbonTab> GetTabCustomizations()
{
return new List<SpreadsheetRibbonTab>
{
new SpreadsheetRibbonTab { TabId = "homeTab", Order = 3 },
new SpreadsheetRibbonTab { TabId = "reviewTab", IsVisible = false },
new SpreadsheetRibbonTab { TabId = "insertTab", Order = 2 }
};
}
}
Constructors
SpreadsheetRibbonTab()
Declaration
public SpreadsheetRibbonTab()
Properties
HeaderText
Gets or sets the display header text for the ribbon tab.
Declaration
public string HeaderText { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the text displayed in the tab header. The default value is Empty. |
Remarks
This property allows overriding the default tab label. If set to an empty string, the built-in label is used.
IsBuiltIn
Gets a value indicating whether this is a built-in tab or a custom tab.
Declaration
public bool IsBuiltIn { get; }
Property Value
| Type | Description |
|---|---|
| bool | true if this is a built-in spreadsheet tab; false if this is a custom tab. This property is read-only and automatically managed. |
Remarks
This property is automatically set by the framework and cannot be modified by users. Built-in tabs correspond to standard SfSpreadsheet tabs such as Home, Insert, Formulas, Review, and View.
IsVisible
Gets or sets a value indicating whether the tab is visible in the ribbon.
Declaration
public bool IsVisible { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | A bool indicating tab visibility. The default value is true. |
Remarks
When false, the tab is hidden from the ribbon but can be shown later via parameter changes or method calls.
Order
Gets or sets the display order of the tab within the ribbon.
Declaration
public int? Order { get; set; }
Property Value
| Type | Description |
|---|---|
| int? | An int? (nullable integer) representing the desired tab order. The default value is null. |
Remarks
Tabs with lower Order values appear first in the ribbon from left to right.
- When null, the tab's existing order is preserved (the user did not customize the order).
- When set to a specific integer, the tab is repositioned accordingly.
TabId
Gets or sets the unique identifier for the ribbon tab.
Declaration
public string TabId { get; set; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the tab's unique identifier. The default value is Empty. |
Remarks
For built-in tabs, standard IDs include:
"homeTab"- The Home tab with formatting, editing, and protection commands."insertTab"- The Insert tab for inserting images, hyperlinks, and functions."formulasTab"- The Formula tab with calculation options and named range management."reviewTab"- The Review tab for protection and name manager commands."viewTab"- The View tab for view-related options.
For custom tabs, use a developer-provided unique identifier.