DayView.ColumnWidthMode Property
Gets or sets whether all DayView columns are equal in width or if column width is calculated individually depending on the number of appointments scheduled for the same time.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v24.2.dll
Declaration
[DefaultValue(ColumnWidthMode.Fixed)]
[XtraSerializableProperty(XtraSerializationFlags.DefaultValue)]
public ColumnWidthMode ColumnWidthMode { get; set; }
Property Value
Type | Default | Description |
---|---|---|
DevExpress.XtraScheduler.ColumnWidthMode | Fixed | Specifies whether column widths are equal. |
Remarks
This property accepts two values: ColumnWidthMode.Auto
and ColumnWidthMode.Fixed
.
- Fixed
- The View is split into equally sized columns (the number of appointments in day columns is irrelevant). This is the default behavior.
- Auto
- In this mode, the View automatically calculates day column widths depending on the number of appointments that occupy the same time slot.
In DayView, this property is in effect when multiple days are selected. ColumnWidthMode is also available in DayView descendants: FullWeekView and WorkWeekView.
Both column width modes allow you to handle the CustomDayViewColumnWidth event to set up custom column widths (in relative units).
How to Set Custom Column or Appointment Width
In Day, Work Week, and Full Week Views, you can set custom appointment or column sizes. Both settings are available when appointments are not grouped by their dates (the SchedulerControl.GroupType property does not equal “Date”).
Custom Column Width
Set the View.ColumnWidthMode
property to “Fixed” and specify the View.ColumnWidth property value.
You can enable the View.AppointmentDisplayOptions.StretchAppointments property so that appointments stretch horizontally to occupy the entire column width.
Custom Appointment Width
Set the View.ColumnWidthMode
property to “Auto” and specify the View.AppointmentDisplayOptions.AppointmentWidth property value.
The View.AppointmentDisplayOptions.StretchAppointments property is also in effect in this mode, and allows you to specify whether rightmost appointments should occupy the remaining time cell space.