Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SpreadsheetControl.DocumentLoaded Event

Occurs after a document is loaded into the Spreadsheet control.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v24.2.dll

NuGet Package: DevExpress.Win.Spreadsheet

#Declaration

public event EventHandler DocumentLoaded

#Event Data

The DocumentLoaded event's data class is EventArgs.

#Remarks

The DocumentLoaded event fires after the LoadDocument method of the SpreadsheetControl or IWorkbook object is executed. It occurs when the document model is built and the loaded document is valid. Handle this event to ensure that a document is loaded completely and you can safely modify it.

The example below shows how to use the DocumentLoaded event to recalculate all formulas in the loaded document.

spreadsheetControl.DocumentLoaded += SpreadsheetControl_DocumentLoaded;
// ...

private void SpreadsheetControl_DocumentLoaded(object sender, System.EventArgs e)
{
    spreadsheetControl.Document.CalculateFull();
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the DocumentLoaded event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also