Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SpreadsheetBuilder.Ribbon(Action<SpreadsheetRibbonSettingsBuilder>) Method

Allows you to customize the ribbon element.

Namespace: DevExpress.AspNetCore.Spreadsheet

Assembly: DevExpress.AspNetCore.Spreadsheet.v24.2.dll

NuGet Package: DevExpress.AspNetCore.Spreadsheet

#Declaration

#Parameters

Name Type Description
configure Action<SpreadsheetRibbonSettingsBuilder>

A delegate method that configures the ribbon.

#Returns

Type Description
SpreadsheetBuilder

An object that can be used to further configure the Spreadsheet.

#Remarks

The example below demonstrates how to customize the font collection that the Font Name item displays:

cshtml
@(Html.DevExpress()
    .Spreadsheet("spreadsheet")
    .Ribbon(ribbon =>
        ribbon.Tabs(tabs => {
            var homeTab = tabs.GetByName("Home");
            homeTab.Items(items => {
                // Removes the default Font Name item
                items.RemoveAt(6); 
                // Adds the Font Name item and customizes its font collection
                items.InsertFontNameItem(6).Items(fonts => {
                    fonts.Clear();
                    fonts.Add("Arial", "Arial");
                    fonts.Add("Calibri", "Calibri");
                    fonts.Add("Times New Roman", "Times New Roman");
                }); 
            });
        })
    )
    // ...
)
See Also