Back to Devexpress

SpreadsheetBuilder.AutoSaveTimeout(TimeSpan) Method

aspnetcore-devexpress-dot-aspnetcore-dot-spreadsheet-dot-spreadsheetbuilder-dot-autosavetimeout-x28-system-dot-timespan-x29.md

latest2.4 KB
Original Source

SpreadsheetBuilder.AutoSaveTimeout(TimeSpan) Method

Gets or sets the auto-save timeout.

Namespace : DevExpress.AspNetCore.Spreadsheet

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

NuGet Package : DevExpress.AspNetCore.Spreadsheet

Declaration

csharp
public SpreadsheetBuilder AutoSaveTimeout(
    TimeSpan timeout
)

Parameters

NameTypeDescription
timeoutTimeSpan

The timeout in milliseconds.

|

Returns

TypeDescription
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:

cshtml
@(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

Enable Auto-Save Feature

SpreadsheetBuilder Class

SpreadsheetBuilder Members

DevExpress.AspNetCore.Spreadsheet Namespace