SpreadsheetControl.DocumentLoaded Event

Occurs after a document is loaded into the Spreadsheet control.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v21.2.dll

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();
}
See Also