WebDocumentViewerBuilder.AutoStartBuild(Boolean) Method
Specifies whether to start building a document automatically before the Document Viewer’s UI is rendered.
Namespace: DevExpress.AspNetCore.Reporting.WebDocumentViewer
Assembly: DevExpress.AspNetCore.Reporting.v25.1.dll
NuGet Package: DevExpress.AspNetCore.Reporting
#Declaration
public WebDocumentViewerBuilder AutoStartBuild(
bool autoStartBuild
)
#Parameters
Name | Type | Description |
---|---|---|
auto |
Boolean |
|
#Returns
Type | Description |
---|---|
Web |
A Web |
#Remarks
In ASP.NET Core MVC applications, the Web Document Viewer sends the startBuild
request automatically before the Document Viewer’s UI is rendered (if there is no need to wait for parameter values in the UI). If the report has no visible parameters and you set parameter values in the ParametersInitialized event handler and call the Submit()
method, the report is generated twice.
Pass false
to the AutoStartBuild
method to disable automatic document generation:
@model DevExpress.XtraReports.Web.WebDocumentViewer.WebDocumentViewerModel
@{
var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer")
.Height("100%")
.AutoStartBuild(false)
.ClientSideEvents(configure => {
configure.ParametersInitialized("onParametersInitialized");
})
.Bind(Model);
@viewerRender.RenderHtml()
}
@* ... *@