Skip to main content
A newer version of this page is available. .

DetailBand() Constructor

Initializes a new instance of the DetailBand class with the default settings.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll

NuGet Packages: DevExpress.Reporting.Core, DevExpress.WindowsDesktop.Core

Declaration

public DetailBand()

Example

The following example demonstrates how to add a control to the DetailBand instance, and then add this band to a report.

using System.Drawing;
using DevExpress.XtraReports.UI;
// ...

// Create a report.
XtraReport rep = new XtraReport();

// Create a DetailBand instance.
DetailBand detail = new DetailBand();

// Create an XRLabel control.
XRLabel label = new XRLabel();

// Set its background color.
label.BackColor = Color.DarkGreen;

// Add the label to the Detail band.
detail.Controls.Add(label);

// Add the Detail band to the report.
rep.Bands.Add(detail);

// Show the report's print preview.
rep.ShowPreview();
See Also