alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class SpreadsheetCustomRibbonTab

    Represents a custom ribbon tab that can be added to the SfSpreadsheet's ribbon interface.

    Inheritance
    object
    SpreadsheetCustomRibbonTab
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Spreadsheet
    Assembly: Syncfusion.Blazor.Spreadsheet.dll
    Syntax
    public class SpreadsheetCustomRibbonTab
    Remarks

    Custom tabs allow developers to extend the ribbon with application-specific functionality beyond the built-in spreadsheet commands. Each custom tab is rendered using a RenderFragment template that defines the tab's content and layout.

    Usage:

    • Provide a Template with your custom tab markup and content.
    • Set Index to control the tab's position in the ribbon; use -1 to append to the end.
    Examples

    Example: Creating a custom ribbon tab

    @using Syncfusion.Blazor.Spreadsheet
    @using Syncfusion.Blazor.Ribbon
    @using Microsoft.AspNetCore.Components
    
    <SfSpreadsheet @ref="SpreadsheetInstance"
                   CustomRibbonTabs="@GetCustomTabs()">
    </SfSpreadsheet>
    
    @code {
        public SfSpreadsheet SpreadsheetInstance { get; set; }
    
        List<SpreadsheetCustomRibbonTab> GetCustomTabs()
        {
            return new List<SpreadsheetCustomRibbonTab>
            {
                new SpreadsheetCustomRibbonTab
                {
                    Index = 2,
                    Template = CustomTabTemplate
                }
            };
        }
    }

    Constructors

    SpreadsheetCustomRibbonTab()

    Declaration
    public SpreadsheetCustomRibbonTab()

    Properties

    Index

    Gets or sets the insertion index for the custom tab within the ribbon's tab collection.

    Declaration
    public int Index { get; set; }
    Property Value
    Type Description
    int

    An int specifying the zero-based position where the tab will be inserted. The default value is -1.

    Remarks

    This property controls the display order of the custom tab relative to existing ribbon tabs.

    • Lower indices appear earlier in the ribbon.
    • When set to -1 or out of range, the tab is appended to the end of the existing tabs.
    • Positive indices are relative to the current tab collection at rendering time.

    Template

    Gets or sets the RenderFragment that defines the custom tab's content and layout.

    Declaration
    public RenderFragment Template { get; set; }
    Property Value
    Type Description
    RenderFragment

    A RenderFragment representing the Blazor markup to render for this tab. The default value is null.

    Remarks

    The developer defines the tab header text, icon, and content within this template using standard Blazor ribbon component syntax. The template receives no parameters and should contain the complete tab UI definition.

    If null, the tab will not be rendered.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved