Note: When the control's GroupingStyle property is set to 'Merged', this method is not applicable and returns null (Nothing in VB).
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub UltraDayView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles UltraDayView1.MouseDown Dim ownerAtPoint As Owner = Me.UltraDayView1.GetOwnerFromPoint(New Point(e.X, e.Y)) If Not ownerAtPoint Is Nothing Then MessageBox.Show("The owner at the cursor position is " + ownerAtPoint.Name) Else MessageBox.Show("The cursor is not positioned over an owner.") End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.Diagnostics; private void ultraDayView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { Owner ownerAtPoint = this.ultraDayView1.GetOwnerFromPoint( new Point(e.X, e.Y) ); if ( ownerAtPoint != null ) MessageBox.Show( "The owner at the cursor position is " + ownerAtPoint.Name ); else MessageBox.Show( "The cursor is not positioned over an owner." ); }
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