Skip to main content

Formatting Services

  • 2 minutes to read

Different parts of the application may require different formatting, especially for time and dates. A set of services is implemented to facilitate this task regarding the XtraScheduler Suite. These services are:

TimeRulerFormatStringService

ITimeRulerFormatStringService interface provides the means to custom format the text of time labels within the Time Ruler. You can override the following methods, substituting the service with its custom descendant:

  • GetHourFormat(TimeRuler ruler)
  • GetHalfDayHourFormat(TimeRuler ruler)
  • GetHourOnlyFormat(TimeRuler ruler)
  • GetTimeDesignatorOnlyFormat(TimeRuler ruler)
  • GetMinutesOnlyFormat(TimeRuler ruler)

These methods should return a format string specifying how to display a corresponding visual element. The location of elements within the time ruler is illustrated below.

TimeSlot.Value is 60 minutes:

TimeRulerCustom60min

TimeSlot.Value is 30 minutes:

TimeRulerCustom30min

HeaderCaptionService

IHeaderCaptionService interface enables you to change the captions of the headers in different views. You can override the following methods, substituting the service with its custom descendant:

  • string GetDayColumnHeaderCaption(DevExpress.Web.ASPxScheduler.Rendering.WebDateHeader header)
  • string GetDayOfWeekHeaderCaption(DevExpress.Web.ASPxScheduler.Rendering.WebDayOfWeekHeader header)
  • string GetHorizontalWeekCellHeaderCaption(DevExpress.Web.ASPxScheduler.Rendering.WebDateCellHeader header)
  • string GetTimeScaleHeaderCaption(DevExpress.Web.ASPxScheduler.Rendering.WebTimeScaleHeader header)
  • string GetVerticalWeekCellHeaderCaption(DevExpress.Web.ASPxScheduler.Rendering.WebDateCellHeader header)

The overridden method should return a format string specifying what to display in a header caption in the corresponding view.

HeaderToolTipService

IHeaderToolTipService interface allows you to specify custom tooltips for the day headers. You can override the following methods, substituting the service with its custom descendant:

  • string GetDayColumnHeaderToolTip(DevExpress.Web.ASPxScheduler.Rendering.WebDateHeader header)
  • string GetDayOfWeekHeaderToolTip(DevExpress.Web.ASPxScheduler.Rendering.WebDayOfWeekHeader header)
  • string GetTimeScaleHeaderToolTip(DevExpress.Web.ASPxScheduler.Rendering.WebTimeScaleHeader header)
  • string GetHorizontalWeekCellHeaderToolTip(DevExpress.Web.ASPxScheduler.Rendering.WebDateCellHeader header)
  • string GetVerticalWeekCellHeaderToolTip(DevExpress.Web.ASPxScheduler.Rendering.WebDateCellHeader header)

Overridden methods should return a format string specifying how to display a header’s tooltip in the corresponding view.

HeaderCustomFormat

AppointmentFormatStringService

IAppointmentFormatStringService interface provides the means to customize the time display format used in the visual representation of appointments. You can override the following methods, substituting the service with its custom descendant:

Overridden methods should return a format string specifying how to display a day header’s tooltip in the corresponding view. The method for using this service is the same as described for the services above.

AppointmentFormatString

See Also