Skip to main content

ViewPrintOptionsBase.AutoResetPrintDocument Property

Gets or sets whether the grid automatically clears a generated print/export document and then generates this document each time the grid is printed/exported. In server mode, this option is not in effect.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v22.2.dll

NuGet Package: DevExpress.Win.Grid


public virtual bool AutoResetPrintDocument { get; set; }

Property Value

Type Default Description
Boolean true

true if a print/export document is automatically cleared and regenerated before it is sent to the output; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to AutoResetPrintDocument


If the AutoResetPrintDocument option is set to true (default), the print/export engine regenerates a resulting document each time the grid is printed/exported. If the View displays a large amount of data, the print/export document generation may take a lot of time.

You can set the AutoResetPrintDocument option to false to prevent a print/export document from being regenerated each time the grid is printed/exported. Disabling this option makes sense when you print and/or export the same data two or more times in succession.

If no print/export document currently exists, the grid automatically generates the document when you print/export the control. You can call BaseView.CreateDocument to manually generate the print/export document beforehand. The BaseView.ClearDocument method allows you to clear (delete) the generated print/export document.

Note that if the AutoResetPrintDocument property is set to false, changes to the grid’s layout (changing filtering, sorting and grouping settings, modifying cell values, etc.) are not reflected in the already-generated print/export document. You need to forcibly regenerate the print/export document (with BaseView.CreateDocument or BaseView.ClearDocument).


When handling large data sources in Server and Instant Feedback Modes, a print/export document is not regenerated each time you print/export the grid; the AutoResetPrintDocument property is ignored. To apply the grid’s layout changes after a print/export document is generated, you need to regenerate the document with the BaseView.CreateDocument method before you print/export the grid.

See Also