What Changed
In v23.1, we implemented a new search mechanism for Web Document Viewer. The new mechanism shows the number of search results and allows you to browse through them while the search is in progress. You can also stop the search process at any time.
Previous versions:
v23.1:
Reasons for Change
This change enhances the search experience in Web Document Viewer. The new search mechanism allows you to asynchronously search documents and browse the search results with no need to wait for the entire document to be scanned. The mechanism also allows you to stop the search process at any time.
Impact on Existing Apps
This change affects user experience in applications with Web Document Viewer.
How to Update Existing Apps
The application is updated automatically when you upgrade to v23.1.
How to Revert to Previous Behavior
Set UseAsyncSearch
to false
to revert to the previous behavior.
ASP.NET Core:
If you bind your control to a WebDocumentViewerModel object, set the UseAsyncSearch
property to false
:
C#\\...
public async Task<IActionResult> Viewer(
[FromServices] IWebDocumentViewerClientSideModelGenerator clientSideModelGenerator,
[FromQuery] string reportName) {
var reportToOpen = string.IsNullOrEmpty(reportName) ? "TestReport" : reportName;
var model = new Models.ViewerModel {
ViewerModelToBind = await clientSideModelGenerator.GetModelAsync(reportToOpen, WebDocumentViewerController.DefaultUri)
};
model.ViewerModelToBind.SearchSettings.UseAsyncSearch = false;
return View(model);
}
If you bind to a report object or by a report name, set UseAsyncSearch
to false
:
Razor@{
var viewerRender = Html.DevExpress().WebDocumentViewer("DocumentViewer")
.SearchSettings(s => s.UseAsyncSearch = false)
.Height("100%")
.Bind(new TestReport());
@viewerRender.RenderHtml()
}
ASP.NET MVC
Razor@Html.DevExpress().WebDocumentViewer(settings => {
settings.Name = "WebDocumentViewer1";
settings.SettingsSearch.UseAsyncSearch = false;
}).Bind("TestReport").GetHtml()
ASP.NET Web Forms
ASPx<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server">
<SettingsSearch UseAsyncSearch="false" />
</dx:ASPxWebDocumentViewer>