Determine Scheduler Cell Contents on DragOver

3 posts, 0 answers
  1. Clyde
    Clyde avatar
    5 posts
    Member since:
    Nov 2012

    Posted 23 Nov 2012 Link to this post

    Hello, 

    I am attempting to determine whether the cell over which the pointer is currently hovering contains an appointment during the DragOver event. 

    So far I have the code below and I believe (probably mistakenly) that the SchedulerCellElement may hold the key to determining the contents of a cell. 

    Private Sub rs_DragOver(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles rs.DragOver
            Try
                Dim p As Point = rs.PointToClient(New Point(e.X, e.Y))
     
                Dim t As DayViewAppointmentsTable = TryCast(rs.SchedulerElement.ViewElement, SchedulerDayViewElement).DataAreaElement.Table
     
                Dim sce As SchedulerCellElement = SchedulerUIHelper.GetCellAtPoint(p, t.Children)
    Catch ex As Exception
     
            End Try
    End Sub

    Any ideas?

    Thank you very much. 

    Clyde
  2. Clyde
    Clyde avatar
    5 posts
    Member since:
    Nov 2012

    Posted 26 Nov 2012 Link to this post

    Just in case anyone is interested I resolved this by obtaining the date from the SchedulerCellElement and checking to see if an appointment exists within that time frame. 
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 28 Nov 2012 Link to this post

    Hello Clyde,

    I am writing to confirm that is the correct way to check whether a cell has an appointment in it.

    I hope this helps.

    All the best,
    Stefan
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
Back to Top