alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class SpreadsheetCustomRibbonGroup

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

    Inheritance
    object
    SpreadsheetCustomRibbonGroup
    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 SpreadsheetCustomRibbonGroup
    Remarks

    Custom groups allow developers to add containers for related custom commands within existing ribbon tabs such as Home or Insert. Groups provide visual separation and organization of related ribbon items.

    Usage:

    • Set TabId to specify the parent tab (e.g., "homeTab", "insertTab").
    • Provide a Template with your custom group markup.
    • Set Index to control the group's position within the tab.
    Examples

    Example: Adding a custom ribbon group to the Home tab

    @using Syncfusion.Blazor.Spreadsheet
    @using Microsoft.AspNetCore.Components
    @using Syncfusion.Blazor.Ribbon
    
    <SfSpreadsheet @ref="SpreadsheetInstance"
                   CustomRibbonGroups="@GetCustomGroups()">
    </SfSpreadsheet>
    
    @code {
        public SfSpreadsheet SpreadsheetInstance { get; set; }
    
        List<SpreadsheetCustomRibbonGroup> GetCustomGroups()
        {
            return new List<SpreadsheetCustomRibbonGroup>
            {
                new SpreadsheetCustomRibbonGroup
                {
                    TabId = "homeTab",
                    Index = 5,
                    Template = CustomGroupTemplate
                }
            };
        }
    }

    Constructors

    SpreadsheetCustomRibbonGroup()

    Declaration
    public SpreadsheetCustomRibbonGroup()

    Properties

    Index

    Gets or sets the insertion index for the custom group within its parent tab.

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

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

    Remarks

    This property controls the display order of the custom group relative to existing groups in the parent tab.

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

    TabId

    Gets or sets the unique identifier of the parent tab that will contain this custom group.

    Declaration
    public string TabId { get; set; }
    Property Value
    Type Description
    string

    A string representing the tab ID (e.g., "homeTab", "insertTab"). The default value is Empty.

    Remarks

    This property specifies which ribbon tab will host the custom group.

    • For built-in tabs, use standard IDs like "homeTab", "insertTab", "reviewTab", or "viewTab".
    • If the specified tab does not exist, the group will not be inserted.
    • An empty string is treated as null.

    Template

    Gets or sets the RenderFragment that defines the custom group'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 group. The default value is null.

    Remarks

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

    If null, the group will not be rendered.

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