aspnetcore-devexpress-dot-aspnetcore-dot-spreadsheet-dot-spreadsheetbuilder-dot-autosavetimeout-x28-system-dot-timespan-x29.md
Gets or sets the auto-save timeout.
Namespace : DevExpress.AspNetCore.Spreadsheet
Assembly : DevExpress.AspNetCore.Spreadsheet.v25.2.dll
NuGet Package : DevExpress.AspNetCore.Spreadsheet
public SpreadsheetBuilder AutoSaveTimeout(
TimeSpan timeout
)
| Name | Type | Description |
|---|---|---|
| timeout | TimeSpan |
The timeout in milliseconds.
|
| Type | Description |
|---|---|
| SpreadsheetBuilder |
An object that can be used to further configure the Spreadsheet.
|
The DocumentManager can save the Spreadsheet’s active document automatically. Pass the On mode to the AutoSaveMode method to enable auto-save feature. Call the AutoSaveTimeout method to set the auto-save timeout:
@(Html.DevExpress().Spreadsheet("spreadsheet")
.Height("800px")
.Width("100%")
.WorkDirectory("~/App_Data/Documents/SampleDocuments")
.DocumentRequestHandlerUrl(Url.Action("DxDocumentRequest"))
.Open(documentPath)
.AutoSaveMode(DevExpress.Web.Office.AutoSaveMode.On)
//Save a document every 3 minute
.AutoSaveTimeout(TimeSpan.FromMinutes(3)))
The DocumentManager processes multiple documents in parts with a 20-second interval to improve performance. This behavior can increase the overall auto-save timeout. If you open a document in multiple Spreadsheet controls with the auto-save feature enabled, the document manager sets the timeout to the smallest value.
See Also