Back to Devexpress

ReportDesignerClientSideEventsBuilder.CustomizeToolbox(String) Method

xtrareports-devexpress-dot-aspnetcore-dot-reporting-dot-reportdesigner-dot-reportdesignerclientsideeventsbuilder-dot-customizetoolbox-x28-system-dot-string-x29.md

latest3.7 KB
Original Source

ReportDesignerClientSideEventsBuilder.CustomizeToolbox(String) Method

Specifies the JavaScript function that handles the Web Report Designer‘s CustomizeToolbox client-side event.

Namespace : DevExpress.AspNetCore.Reporting.ReportDesigner

Assembly : DevExpress.AspNetCore.Reporting.v25.2.dll

NuGet Package : DevExpress.AspNetCore.Reporting

Declaration

csharp
public ReportDesignerClientSideEventsBuilder CustomizeToolbox(
    string callback
)
vb
Public Function CustomizeToolbox(
    callback As String
) As ReportDesignerClientSideEventsBuilder

Parameters

NameTypeDescription
callbackString

The name of a JavaScript function or the JavaScript function code used to handle the CustomizeToolbox event.

|

Returns

TypeDescription
ReportDesignerClientSideEventsBuilder

A ReportDesignerClientSideEventsBuilder that can be used to further configure the Report Designer Client Side Events.

|

Remarks

Handle this event to customize the Web Report Designer’s Toolbox - hide the built-in toolbox items or add custom toolbox items.

The ControlsFactory event argument contains information about all controls available in the Toolbox.

The following client-side event handler function hides the Label control in the End User Designer Toolbox:

javascript
function onCustomizeToolbox(s, e) {
  var labelInfo = e.ControlsFactory.getControlInfo("XRLabel");
  labelInfo.isToolboxItem = false;
}

Use the ControlsFactory.registerControl method to register a custom control. Review the following help topic that explains how to add a custom control to the toolbox: Create and Register a Custom Control in the Report Designer Toolbox (ASP.NET Web Forms).

See Also

ReportDesignerClientSideEventsBuilder Class

ReportDesignerClientSideEventsBuilder Members

DevExpress.AspNetCore.Reporting.ReportDesigner Namespace