ApplicationOptionsSpreadsheetExtensions.AddSpreadsheet(ApplicationOptions, Action<SpreadsheetOptions>) Method
In This Article
Allows you to configure a Spreadsheet.
Namespace: DevExpress.AspNetCore
Assembly: DevExpress.AspNetCore.Spreadsheet.v24.2.dll
NuGet Package: DevExpress.AspNetCore.Spreadsheet
#Declaration
C#
public static ApplicationOptions AddSpreadsheet(
this ApplicationOptions applicationOptions,
Action<SpreadsheetOptions> spreadsheetOptions
)
#Parameters
Name | Type | Description |
---|---|---|
application |
Application |
The application options. |
spreadsheet |
Action<Spreadsheet |
A method that configures the Spreadsheet options. |
#Returns
Type | Description |
---|---|
Application |
An object that can be used to further configure the application options. |
#Remarks
The example below demonstrates how to handle the CellValueChanged
event:
builder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
builder.Services.AddDevExpressControls(options => {
options.AddSpreadsheet(
spreadsheetOptions => {
spreadsheetOptions
.AddCellValueChanged(
(object sender, SpreadsheetCellEventArgs e) => {
if(!e.OldValue.IsEmpty && e.Value.IsEmpty) {
e.Cell.Value = "deleted";
}
}
);
}
);
});
See Also