Version

DeleteAllActivity Method

Deletes all of the Appointments and Notes that were assigned to this owner.
Syntax
'Declaration
 
Public Sub DeleteAllActivity() 
public void DeleteAllActivity()
Example
The following code sample demonstrates how to use the Owner object's DeleteAllActivity method to delete all appointments and notes for a specific owner.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

    Private Sub UltraDayView1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles UltraDayView1.KeyDown
        If (e.KeyCode Or Keys.Delete) = Keys.Delete AndAlso e.Shift Then

            If Not Me.UltraDayView1.ActiveOwner Is Nothing Then

                If MessageBox.Show(Me, "Would you like to delete all activity for '" + Me.UltraDayView1.ActiveOwner.Name + "'?", "Delete All Activity?", MessageBoxButtons.YesNo) = DialogResult.Yes Then
                    Me.UltraDayView1.ActiveOwner.DeleteAllActivity()
                End If
            End If
        End If

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

		private void ultraDayView1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
		{
			if ( (e.KeyCode & Keys.Delete ) == Keys.Delete && e.Shift )
			{
				if ( this.ultraDayView1.ActiveOwner != null )
				{
					if ( MessageBox.Show( this, "Would you like to delete all activity for '" + this.ultraDayView1.ActiveOwner.Name + "'?", "Delete All Activity?", MessageBoxButtons.YesNo ) == DialogResult.Yes )
						this.ultraDayView1.ActiveOwner.DeleteAllActivity();
				}
			}
		}
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