Version

EnsureTimeSlotVisible(Int32,Boolean) Method

Ensures that the TimeSlot identified by the supplied time slot index is visible. Scrolls the TimeSlot into view if it is not.
Syntax
'Declaration
 
Public Overloads Function EnsureTimeSlotVisible( _
   ByVal timeSlotIndex As Integer, _
   ByVal forceIntoFirstTimeSlot As Boolean _
) As Boolean
public bool EnsureTimeSlotVisible( 
   int timeSlotIndex,
   bool forceIntoFirstTimeSlot
)

Parameters

timeSlotIndex
Index of the TimeSlot in the TimeSlotsCollection
forceIntoFirstTimeSlot
If true, forces the TimeSlot to be made visible in the first visible position.

Return Value

Returns true if the display had to be scrolled to make the TimeSlot visible, false if it was already visible.
Example
The following code demonstrates how to call the EnsureTimeSlotVisible method of the UltraDayView control.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

	Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click

		' EnsureTimeSlotVisible can be called 3 different ways.

		' Passing a datetime to indicate the desired timeslot time
		Me.UltraDayView1.EnsureTimeSlotVisible(New DateTime(1, 1, 1, 12, 15, 0), True)

		' Passing an hour and minute to indicate the desired timeslot time.
		Me.UltraDayView1.EnsureTimeSlotVisible(12, 15, True)

		' Passing the index of the desired timeslot.
		Me.UltraDayView1.EnsureTimeSlotVisible(Me.UltraDayView1.GetTimeSlotFromTime(New DateTime(1, 1, 1, 12, 15, 0)).Index, True)

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;

		private void button3_Click(object sender, System.EventArgs e)
		{

			// EnsureTimeSlotVisible can be called 3 different ways.

			// Passing a datetime to indicate the desired timeslot time
			this.ultraDayView1.EnsureTimeSlotVisible(new DateTime(1, 1, 1, 12, 15, 00), true);

			// Passing an hour and minute to indicate the desired timeslot time.
			this.ultraDayView1.EnsureTimeSlotVisible(12, 15, true);

			// Passing the index of the desired timeslot.
			this.ultraDayView1.EnsureTimeSlotVisible(this.ultraDayView1.GetTimeSlotFromTime(new DateTime(1, 1, 1, 12, 15, 00)).Index, true);

		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also