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
)
Parameters
Name | Type | Description |
---|---|---|
options | ASPxDesignerElementSerializationInfoWithBindings | An object that stores information required to serialize element properties. |
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
isExpression | Boolean | True | 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. |
Remarks
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"],
});
// ...
}