Skip to main content

SpreadsheetRibbonItemCollectionBuilder Class

A builder for the Spreadsheet ribbon item collection.

Namespace: DevExpress.AspNetCore.Spreadsheet

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

Declaration

public class SpreadsheetRibbonItemCollectionBuilder :
    RibbonItemCollectionBuilder<SpreadsheetRibbonItemCollectionBuilder>

Remarks

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

@(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");
                }); 
            });
        })
    )
    // ...
)

Inheritance

See Also