Back to Devexpress

MultiColumn.ColumnWidth Property

xtrareports-devexpress-dot-xtrareports-dot-ui-dot-multicolumn-1d5ddbd9.md

latest4.3 KB
Original Source

MultiColumn.ColumnWidth Property

Gets or sets the widths of the columns when printing muli-column reports.

Namespace : DevExpress.XtraReports.UI

Assembly : DevExpress.XtraReports.v25.2.dll

NuGet Package : DevExpress.Reporting.Core

Declaration

csharp
[DefaultValue(0F)]
public float ColumnWidth { get; set; }
vb
<DefaultValue(0F)>
Public Property ColumnWidth As Single

Property Value

TypeDefaultDescription
Single0

A Single value representing the width of one column in a multicolumn report. This width is measured in report units.

|

Remarks

The multicolumn feature is enabled if the ColumnWidth property’s value is greater than 0 and the MultiColumn.Mode property’s value is set to the UseColumnWidth value. Note that the ColumnWidth property’s value is ignored if the MultiColumn.Mode property is set to a value other than UseColumnWidth.

To learn more about the multicolumn representation of reports, see the Creating a Multi-Column Report topic.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ColumnWidth property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

reporting-winforms-label-report-in-code/CS/Reporting_how-to-create-a-label-report-at-runtime-t473792/LabelReportRuntime/CustomLabelReportBuilder.cs#L62

csharp
if (labelInfo.MoreOneColumnOnPage(paperKindList.Size, paperKindList.UnitDpi)) {
    detail.MultiColumn.ColumnWidth = XRConvert.Convert(labelInfo.LabelWidth, labelDpi, report.Dpi);
    detail.MultiColumn.ColumnSpacing = XRConvert.Convert(labelInfo.HPitch - labelInfo.LabelWidth, labelDpi, report.Dpi);

reporting-winforms-label-report-in-code/VB/Reporting_how-to-create-a-label-report-at-runtime-t473792/LabelReportRuntime/CustomLabelReportBuilder.vb#L61

vb
If labelInfo.MoreOneColumnOnPage(paperKindList.Size, paperKindList.UnitDpi) Then
    detail.MultiColumn.ColumnWidth = XRConvert.Convert(labelInfo.LabelWidth, labelDpi, report.Dpi)
    detail.MultiColumn.ColumnSpacing = XRConvert.Convert(labelInfo.HPitch - labelInfo.LabelWidth, labelDpi, report.Dpi)

See Also

Mode

ColumnSpacing

Report Units of Measurement

MultiColumn Class

MultiColumn Members

DevExpress.XtraReports.UI Namespace