'Declaration Public Overridable Function PerformKeyAction( _ ByVal actionCode As UltraDayViewAction, _ ByVal shift As Boolean, _ ByVal control As Boolean _ ) As Boolean
public virtual bool PerformKeyAction( UltraDayViewAction actionCode, bool shift, bool control )
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.
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); } }
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