xtrareports-js-devexpress-dot-reporting-dot-viewer-dot-settings-dot-searchavailable-1.md
Enables the Search action.
export const SearchAvailable: DevExpress.Analytics.Internal.IGlobalSubscribableValue<boolean>
| Name | Type |
|---|---|
| newVal | boolean |
| Type | Description |
|---|---|
| boolean |
True to enable the Search action; otherwise, false.
|
Set the SearchAvailable property to false to disable the action that displays the Search panel.
You can handle the ASPxClientWebDocumentViewer.CustomizeElements event and specify the SearchAvailable setting to remove the Search action in the Document Viewer:
<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server">
<ClientSideEvents CustomizeElements = "function(s, e) {
DevExpress.Reporting.Viewer.Settings.SearchAvailable(true);}" />
</dx:ASPxWebDocumentViewer>
@Html.DevExpress().WebDocumentViewer(settings => {
settings.Name = "WebDocumentViewer1";
settings.ClientSideEvents.CustomizeElements =
"function(s, e){ DevExpress.Reporting.Viewer.Settings.SearchAvailable(true); }";
}).Bind("TestReport").GetHtml()
<script type="text/javascript" id="script">
function configureViewer(s, e) {
DevExpress.Reporting.Viewer.Settings.SearchAvailable(true);
}
</script>
@{
var documentViewer = Html.DevExpress().WebDocumentViewer("webDocumentViewer1").Height("1000px");
documentViewer.Bind("TestReport");
documentViewer.ClientSideEvents(configure => { configure.CustomizeElements("configureViewer"); });
}
@documentViewer
SearchAvailable(true)
SearchAvailable(false)