ASPxDesignerControlsFactory.createPopularBindingInfo(ASPxDesignerElementSerializationInfoWithBindings, Boolean) Method

Create a new object that stores information required to display element properties in the list of popular actions.

Namespace: DevExpress.XtraReports.Web.Scripts

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

Declaration

public ASPxDesignerElementSerializationInfoWithBindings createPopularBindingInfo(
    ASPxDesignerElementSerializationInfoWithBindings options,
    bool isExpression = true
)
Public Function createPopularBindingInfo(
    options As ASPxDesignerElementSerializationInfoWithBindings,
    isExpression As Boolean = True
) As ASPxDesignerElementSerializationInfoWithBindings

Parameters

Type Name Description
ASPxDesignerElementSerializationInfoWithBindings options

An object that stores information required to serialize element properties.

Boolean isExpression

true (the default value) to create an expression binding; false to create a legacy data binding.

Returns

Type Description
ASPxDesignerElementSerializationInfoWithBindings

An object that specifies the resulting serialization info.

In the CustomizeToolbox event handler, use the createPopularBindingInfo method to create serialization information for a custom control's properties.

Then, add the created information to the custom control's info collection and the corresponding binding names to the popularProperties collection as shown below.


function customizeToolbox(s, e) {
  // ...
  var controlsFactory = e.ControlsFactory;
  var expressionInfo = controlsFactory.createPopularBindingInfo({ bindingName: "BindableProperty", displayName: "Bindable Property", localizationId: "BindableProperty" }, true)
  var dataBindingInfo = controlsFactory.createPopularBindingInfo({ bindingName: "BindableProperty", displayName: "Bindable Property", localizationId: "BindableProperty" }, false)

  // Create an object containing info about a custom label toolbox item.
  var customLabelInfo = controlsFactory.inheritControl("XRLabel", {
    defaultVal: {
      "@ControlType": fullTypeName,
      "@SizeF": "100,23"
    },
    toolboxIndex: 1,
    info: [expressionInfo, dataBindingInfo],
    popularProperties: ["popularExpression", "popularDataBinding"],
  });
  // ...
}

See Also