Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DetailBand() Constructor

In This Article

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

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v24.2.dll

NuGet Package: DevExpress.Reporting.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