Back to Devexpress

DocumentManager.CloseAllDocuments() Method

aspnet-devexpress-dot-web-dot-office-dot-documentmanager.md

latest2.3 KB
Original Source

DocumentManager.CloseAllDocuments() Method

Closes all open documents.

Namespace : DevExpress.Web.Office

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public static void CloseAllDocuments()
vb
Public Shared Sub CloseAllDocuments

Remarks

The CloseAllDocuments method closes all open documents and clears all the session parameters, including the Rich Text Editor/Spreadsheet settings.

csharp
DocumentManager.CloseAllDocuments();
vb
DocumentManager.CloseAllDocuments()

Note

The CloseAllDocuments method is not in effect when a custom StateProvider is used.

We recommend that you use the CloseDocument(String) method to close only specific documents specified by the document ID.

csharp
DocumentManager.CloseDocument(ASPxSpreadsheet1.DocumentId);
vb
DocumentManager.CloseDocument(ASPxSpreadsheet1.DocumentId)

When you close a document, DocumentManager closes it for all users who work on the document. It can cause NullReferenceException and “Your session has expired” errors. To avoid these errors, close unshared documents only.

See Also

Spreadsheet Document Management

RichEdit Document Management

DocumentManager Class

DocumentManager Members

DevExpress.Web.Office Namespace