Version

SwapIndex Method

Swaps the the Index of this owner with the specified owner.
Syntax
'Declaration
 
Public Sub SwapIndex( _
   ByVal owner As Owner _
) 
public void SwapIndex( 
   Owner owner
)

Parameters

owner
The owner to swap indices with.
Example
The following code sample demonstrates how the SwapIndex method can be used to exchange positions between 2 owners, and how the ReassignAllActivity method can be used to assign one owner's activity to another.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        '	Clear the Owners collection
        Me.UltraDayView1.CalendarInfo.Owners.Clear()

        '	Hide the unassigned owner
        Me.UltraDayView1.CalendarInfo.Owners.UnassignedOwner.Visible = False

        '	Add 2 owners
        Dim ownerFrick As Infragistics.Win.UltraWinSchedule.Owner = Me.UltraDayView1.CalendarInfo.Owners.Add("frick", "Frick")
        Dim ownerFrack As Infragistics.Win.UltraWinSchedule.Owner = Me.UltraDayView1.CalendarInfo.Owners.Add("frack", "Frack")

        '	Add an appointment for "Frick"
        Dim appointmentFrick As Appointment = Me.UltraCalendarInfo1.Appointments.Add(DateTime.Today, "Frick's Appointment")
        appointmentFrick.Owner = ownerFrick

        '	Add an appointment for "Frack"
        Dim appointmentFrack As Appointment = Me.UltraCalendarInfo1.Appointments.Add(DateTime.Today, "Frack's Appointment")
        appointmentFrack.Owner = ownerFrack

        '	Use the SwapIndex method to swap positions for the 2 owners
        ownerFrick.SwapIndex(ownerFrack)

        '	Use the ReassignAllActivity method to assign all of "Frick's" activity to "Frack"
        ownerFrick.ReassignAllActivity(ownerFrack)

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

		private void button1_Click(object sender, System.EventArgs e)
		{
			//	Clear the Owners collection
			this.ultraDayView1.CalendarInfo.Owners.Clear();

			//	Hide the unassigned owner
			this.ultraDayView1.CalendarInfo.Owners.UnassignedOwner.Visible = false;

			//	Add 2 owners
			Infragistics.Win.UltraWinSchedule.Owner ownerFrick = this.ultraDayView1.CalendarInfo.Owners.Add( "frick", "Frick" );
			Infragistics.Win.UltraWinSchedule.Owner ownerFrack = this.ultraDayView1.CalendarInfo.Owners.Add( "frack", "Frack" );

			//	Add an appointment for "Frick"
			Appointment appointmentFrick = this.ultraCalendarInfo1.Appointments.Add( DateTime.Today, "Frick's Appointment" );
			appointmentFrick.Owner = ownerFrick;

			//	Add an appointment for "Frack"
			Appointment appointmentFrack = this.ultraCalendarInfo1.Appointments.Add( DateTime.Today, "Frack's Appointment" );
			appointmentFrack.Owner = ownerFrack;

			//	Use the SwapIndex method to swap positions for the 2 owners
			ownerFrick.SwapIndex( ownerFrack );

			//	Use the ReassignAllActivity method to assign all of "Frick's" activity to "Frack"
			ownerFrick.ReassignAllActivity( ownerFrack );
		}
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