Back to Devexpress

SchedulerViewBase.FirstVisibleResourceIndex Property

windowsforms-devexpress-dot-xtrascheduler-dot-schedulerviewbase-6d809f36.md

latest4.5 KB
Original Source

SchedulerViewBase.FirstVisibleResourceIndex Property

Gets or sets the visible index of the first resourse currently displayed on-screen.

Namespace : DevExpress.XtraScheduler

Assembly : DevExpress.XtraScheduler.v25.2.dll

NuGet Package : DevExpress.Win.Scheduler

Declaration

csharp
[Browsable(false)]
public int FirstVisibleResourceIndex { get; set; }
vb
<Browsable(False)>
Public Property FirstVisibleResourceIndex As Integer

Property Value

TypeDescription
Int32

An integer value which represents the zero-based index of the first visible resource.

|

Remarks

Resources are visible to end-users if the SchedulerControl.GroupType property is set to the Resource value.

The maximum number of resources simultaneously displayed on screen depends on the View’s SchedulerViewBase.ResourcesPerPage property value. You can use the FirstVisibleResourceIndex property to scroll the Scheduler View to the specific resource.

The following code snippets (auto-collected from DevExpress Examples) contain references to the FirstVisibleResourceIndex 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.

winforms-scheduler-manage-resources-runtime/CS/SchedulerResourcesManagement/Form1.cs#L106

csharp
private void ScrollToLastResource() {
    schedulerControl1.ActiveView.FirstVisibleResourceIndex = Math.Max(0, schedulerStorage1.Resources.Count - schedulerControl1.ActiveView.ResourcesPerPage);
    schedulerControl1.Services.Selection.SelectedResource = schedulerStorage1.Resources[schedulerStorage1.Resources.Count - 1];

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

csharp
for (int i = 0; i < schedulerControl1.ActiveView.ResourcesPerPage; i++) {
    resourcesVisible.Add(schedulerDataStorage1.Resources[schedulerControl1.ActiveView.FirstVisibleResourceIndex + i]);
}

winforms-scheduler-manage-resources-runtime/VB/SchedulerResourcesManagement/Form1.vb#L109

vb
Private Sub ScrollToLastResource()
    schedulerControl1.ActiveView.FirstVisibleResourceIndex = Math.Max(0, schedulerStorage1.Resources.Count - schedulerControl1.ActiveView.ResourcesPerPage)
    schedulerControl1.Services.Selection.SelectedResource = schedulerStorage1.Resources(schedulerStorage1.Resources.Count - 1)

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

vb
For i As Integer = 0 To schedulerControl1.ActiveView.ResourcesPerPage - 1
    resourcesVisible.Add(schedulerDataStorage1.Resources(schedulerControl1.ActiveView.FirstVisibleResourceIndex + i))
Next

See Also

SchedulerViewBase Class

SchedulerViewBase Members

DevExpress.XtraScheduler Namespace