ASPxDesignerControlsFactory.inheritControl(String, ASPxDesignerToolboxItem) Method

Inherits a new control from the specified parent control and extends it with the specified options.

Namespace: DevExpress.XtraReports.Web.Scripts

Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll


public ASPxDesignerToolboxItem inheritControl(
    string parentType,
    ASPxDesignerToolboxItem extendedOptions
Public Function inheritControl(
    parentType As String,
    extendedOptions As ASPxDesignerToolboxItem
) As ASPxDesignerToolboxItem


Type Name Description
String parentType

A string that specifies the type of a control from which a new control should be inherited.

ASPxDesignerToolboxItem extendedOptions

An object that specifies options for a new control.


Type Description

An object that specifies the resulting control and its options.


The inheritControl method allows you to derive a new custom control from an existing one. Pass the parent control's type as the first method parameter and the required control options as the second method parameter. Note that the info and popularProperties options are concatenated with the parent control's corresponding options, while all other options replace the parent options.

The following code snippet demonstrates how to create a new custom control in the CustomizeToolbox event handler.

function customizeToolbox(s, e) {
  // Create an object containing info about a custom label toolbox item.
  var customLabelInfo = controlsFactory.inheritControl("XRLabel", {
    surfaceType: CustomLabelSurface,
    defaultVal: {
      "@ControlType": fullTypeName,
      "@SizeF": "100,23"
    toolboxIndex: 1,
    info: [somePropertySerializationInfo, bindablePropertySerializationInfo],
    popularProperties: ["someProperty", "bindableProperty"],

Use the registerControl method to register a custom control in the Toolbox.

See Register a Custom Control in the Report Designer Toolbox for a step-by-step tutorial on how to add a custom control.

See Also