Skip to content

LexEPoX/how-to-hide-certain-columns-in-the-timeline-view-implement-a-custom-scale-e531

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to hide certain columns in the Timeline view (implement a custom scale)

Problem:

I'd like to hide columns for certain (non-working) hours in the TimelineView. How can I accomplish this?

Solution:

You can implement a custom time scale. It enables you to hide unneeded time periods.
A custom time scale class is inherited from the TimeScale class, overriding methods for the DateTime data handling and formatting.
You should override the following properties and methods:
SortingWeight - used to compare time scales;
Floor - specifies column boundaries;
HasNextDate - checks whether the move to the next date is allowed;
GetNextDate - navigates to the next date;
DefaultDisplayFormat - specifies the format for the column header caption;
DefaultMenuCaption - specifies the caption for the context menu item which enables this time scale;
FormatCaption - returns a string to be displayed as a column header caption.

To ensure a proper alignment of an upper (Day) scale, create a descendant with the Floor method overridden. Add this descendant to the scales collection in place of the default TimeScaleDay scale.


About

.NET, XtraScheduler Suite

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%