SpreadsheetBuilder.Ribbon(Action<SpreadsheetRibbonSettingsBuilder>) Method
Allows you to customize the ribbon element.
Namespace: DevExpress.AspNetCore.Spreadsheet
Assembly: DevExpress.AspNetCore.Spreadsheet.v24.2.dll
Declaration
public SpreadsheetBuilder Ribbon(
Action<SpreadsheetRibbonSettingsBuilder> configure
)
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:
@(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