Back to Devexpress

SchedulerControl.VisibleResourcesChanged Event

windowsforms-devexpress-dot-xtrascheduler-dot-schedulercontrol-11f48f40.md

latest4.9 KB
Original Source

SchedulerControl.VisibleResourcesChanged Event

Occurs when resources displayed in the scheduler view are changed, or the number of visible resources is changed, or the scheduler switches views.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
public event VisibleResourcesChangedEventHandler VisibleResourcesChanged
vb
Public Event VisibleResourcesChanged As VisibleResourcesChangedEventHandler

Event Data

The VisibleResourcesChanged event's data class is VisibleResourcesChangedEventArgs. The following properties provide information specific to this event:

PropertyDescription
NewFirstVisibleResourceIndexGets the index of the first (the leftmost or the topmost, depending on the view) resource displayed in the view after the change of visible resources occurs.
NewResourcePerPageGets the new number of displayed resources.
OldFirstVisibleResourceIndexGets the index of the first (the leftmost or the topmost, depending on the view) resource displayed in the view before the change of visible resources occurs.
OldResourcePerPageGets the number of displayed resources before the change takes place.

The event data class exposes the following methods:

MethodDescription
GetVisibleResources()Obtains a collection of visible resources.

Remarks

The Resource Navigator control allows end-users to navigate resources or change the number of visible resources (the SchedulerViewBase.ResourcesPerPage property). When the end user performs this action, the VisibleResourcesChanged event occurs.

The VisibleResourcesChanged event allows you to specify a filter for displayed resources or use the SchedulerStorageBase.FetchAppointments event to load appointments for visible resources only. This may be useful when a large number of resources affect the scheduler performance.

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

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.

winforms-scheduler-optimize-performance-large-dataset/CS/FetchAppointmentExample/Form1.cs#L31

csharp
schedulerControl1.VisibleIntervalChanged += schedulerControl1_VisibleIntervalChanged;
schedulerControl1.VisibleResourcesChanged += SchedulerControl1_VisibleResourcesChanged;

winforms-scheduler-optimize-performance-large-dataset/VB/FetchAppointmentExample/Form1.vb#L31

vb
AddHandler schedulerControl1.VisibleIntervalChanged, AddressOf schedulerControl1_VisibleIntervalChanged
AddHandler schedulerControl1.VisibleResourcesChanged, AddressOf SchedulerControl1_VisibleResourcesChanged
schedulerControl1.Start = Date.Today

See Also

SchedulerControl Class

SchedulerControl Members

DevExpress.XtraScheduler Namespace