Version

PerformAction(UltraDayViewAction) Method

Simulates user interaction with the control.
Syntax
'Declaration
 
Public Overloads Overridable Function PerformAction( _
   ByVal actionCode As UltraDayViewAction _
) As Boolean
public virtual bool PerformAction( 
   UltraDayViewAction actionCode
)

Parameters

actionCode
Enumeration indicating the action to take.

Return Value

true if the action completed successfully, false if the action failed.
Remarks

Invoke this method to simulate an action the user can perform.

Many actions are only appropriate in certain situations; if an action is inappropriate, it will not be performed. For example, attempting to delete appointments by performing the DeleteSelectedAppointments action will have no effect if no appointments are selected.

You can use the CurrentState property to determine the state of the control when the action is about to be performed.

Example
The following code demonstrates how to perform a built-in UltraDayView action in response to a button being clicked. The action to be performed is to select the same time slot in the next day.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

	Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

		' Get the current state of the UltraDayView control
		Dim state As UltraDayViewState = Me.UltraDayView1.CurrentState

		' Check the state bit flags to see if a time slot is selected
		If (state And UltraDayViewState.TimeSlotSelected) <> 0 Then

			' Since a time slot is selected, call PerformAction
			' to select the same time slot in the next day.
			Me.UltraDayView1.PerformAction(UltraDayViewAction.SameTimeSlotNextDay)
		End If

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

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

			// Get the current state of the UltraDayView control
			UltraDayViewState state = this.ultraDayView1.CurrentState;

			// Check the state bit flags to see if a time slot is selected
			if ((state & UltraDayViewState.TimeSlotSelected) != 0)
			{
				// Since a time slot is selected, call PerformAction
				// to select the same time slot in the next day.
				this.ultraDayView1.PerformAction(UltraDayViewAction.SameTimeSlotNextDay);
			}

		}
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