ReportPreviewSettingsBuilder.SearchSettings(Action<SearchSettings>) Method
Allows you to specify Report Designer Preview search settings.
Namespace: DevExpress.AspNetCore.Reporting.ReportDesigner
Assembly: DevExpress.AspNetCore.Reporting.v24.1.dll
NuGet Package: DevExpress.AspNetCore.Reporting
Declaration
Parameters
Name | Type | Description |
---|---|---|
configure | Action<SearchSettings> | A delegate method that includes search settings. |
Returns
Type | Description |
---|---|
ReportPreviewSettingsBuilder | A ReportPreviewSettingsBuilder object that can be used to further configure the Report Designer Preview. |
Remarks
The SearchSettings
method allows you to hide search actions or disable asynchronous search in Document Preview in Web Reporting.
This property gives you 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 hides Search buttons (Ribbon and Side Panel) in the Report Designer Preview:
@{
var designerRender = Html.DevExpress().ReportDesigner("reportDesigner")
.Height("100%")
.ReportPreviewSettings(
p=>p.SearchSettings(
s=>s.SearchEnabled = false))
.Bind(new TestReport());
@designerRender.RenderHtml()
}
If you bind the Web Report Designer control to a ReportDesignerModel object, use the ReportPreviewSettings(Action<ReportPreviewSettings>) property instead:
public class HomeController : Controller {
public IActionResult ReportDesigner(
// ...
var designerModel = reportDesignerModelBuilder
.Report(reportName)
.ReportPreviewSettings(
p => p.SearchSettings.SearchEnabled = false)
.DataSources(x => {
x.Add("Northwind", ds);
})
.BuildModel();
return View(designerModel);
}
}