Skip to main content
All docs
V25.1
  • WebDocumentViewerSettingsBase.SearchSettings Property

    Allows you to specify the Web Document Viewer‘s search settings.

    Namespace: DevExpress.XtraReports.Web.WebDocumentViewer

    Assembly: DevExpress.Data.v25.1.dll

    NuGet Package: DevExpress.Data

    Declaration

    public SearchSettings SearchSettings { get; set; }

    Property Value

    Type Description
    SearchSettings

    A class that contains settings that apply to search operations.

    Remarks

    This property provides access to the following properties:

    SearchEnabled
    Allows you to hide the search actions.
    UseAsyncSearch
    Specifies whether the Web Document Viewer uses asynchronous search.

    The following code snippet shows how to hide search actions in an ASP.NET Core application (if you bind the Web Document Viewer control to a WebDocumentViewerModel object):

    \\...
    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.SearchEnabled = false;
        return View(model);
    }
    

    If you bind the Web Document Viewer to a report object or by a report name, use the WebDocumentViewerBuilder.SearchSettings method instead.

    See Also