Skip to main content

SpreadsheetBuilder.AutoSaveTimeout(TimeSpan) Method

Gets or sets the auto-save timeout.

Namespace: DevExpress.AspNetCore.Spreadsheet

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

NuGet Package: DevExpress.AspNetCore.Spreadsheet

Declaration

public SpreadsheetBuilder AutoSaveTimeout(
    TimeSpan timeout
)

Parameters

Name Type Description
timeout TimeSpan

The timeout in milliseconds.

Returns

Type Description
SpreadsheetBuilder

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

Remarks

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