ASPxClientReportDesigner.ComponentAdded Event
Occurs after a component has been added to the report currently being edited in the Web Report Designer.
Namespace: DevExpress.XtraReports.Web.Scripts
Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll
Declaration
Event Data
The ComponentAdded event's data class is ASPxClientReportDesignerComponentAddedEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Model | Gets the model of a component that has been added to a report. |
Parent | Gets the parent of a component that has been added to a report. |
Remarks
The ComponentAdded event raises when an end-user drops a control from the Toolbox onto the report currently being edited in the Report Designer.
The code sample below demonstrates how to use this event to change the text and text alignment properties of label controls added to the report.
<script type="text/javascript" id="script">
function componentAdded(s, e) {
var model = e.Model;
if (model.controlType === "XRLabel") {
model.text("Label");
model.textAlignment("MiddleCenter")
}
}
</script>
<dx:ASPxReportDesigner ID="ASPxReportDesigner1" runat="server">
<ClientSideEvents ComponentAdded="componentAdded"/>
</dx:ASPxReportDesigner>
See Also