SimpleLink.CreateDetail Event
Occurs every time the detail area of a SimpleLink is created.
Namespace: DevExpress.Xpf.Printing
Assembly: DevExpress.Xpf.Printing.v14.2.dll
#Declaration
#Event Data
The CreateDetail event's handler receives an argument of the CreateAreaEventArgs type. The following properties provide information specific to this event:
Property | Description |
---|---|
Data | Gets or sets the object, which represents data for the area creation event. |
Detail |
Gets or sets the index of a detail row for which the area creation event was called. |
#Remarks
The CreateDetail event is raised after the LinkBase.CreateDocument method is called for the SimpleLink object. This event is raised as many times as specified by the SimpleLink.DetailCount property value.
Handle the CreateDetail event to provide data for the detail area. An object containing data should be assigned to the CreateAreaEventArgs.Data property, and it will be represented using the template provided by the SimpleLink.DetailTemplate property.
NOTE
Do not pass visual objects (such as Text
#Examples
This example demonstrates how to use the SimpleLink class to print data from a non-hierarchical data source, by using the following approach.
- Create a DataTemplate for a single detail row and assign it to the SimpleLink.DetailTemplate property;
- Then, set the SimpleLink.DetailCount property to the total count of data rows in a data source;
- Handle the SimpleLink.CreateDetail event, and provide data for its CreateAreaEventArgs.Data parameter;
- Call the LinkBase.CreateDocument method to generate report pages.