Drag enabling/disabling

2 posts, 0 answers
  1. Terry Newton
    Terry Newton avatar
    21 posts
    Member since:
    Oct 2009

    Posted 12 May 2010 Link to this post

     

     

     

     

     

    I am trying to fully control the look of dragging items within the week and day mode on the calendar.  I have used the query events and this works, but I want to do better and prevent the changes to the look that happen when an appointment is attempted to be dragged and I do not want to allow it.  It seems like I should be able to stop this before it begins rather than after when the UI has dropped the image of the appointmewnt already.

    I am trying:

    Dim
    oAppointments As IList(Of AppointmentItem) = Me.ctlCalendar.ChildrenOfType(Of AppointmentItem)()

     

     

     

    For

     

     

    Each oAppointmentItem In oAppointments
    [some logic to set bDragPossible]

     

     

     

    oAppointmentItem.SetValue(DragDrop.

     

    RadDragAndDropManager.AllowDragProperty, bDragPossible)
    Next

    The problem I am running into with this is that even though I call this on the items I wish to diable drag on with a bDragPossible of false, it is ineffective and in the IDE I do not see any property on the AppointItem for the AllowDrag like there is for the allowDrop, so I think it is ignoring this attempt.

    How can I shut down dragging at the source before it starts?

     

  2. Terry Newton
    Terry Newton avatar
    21 posts
    Member since:
    Oct 2009

    Posted 12 May 2010 Link to this post

    Nevermind.

    DragDrop.

     

    RadDragAndDropManager.SetAllowDrag(oAppointmentItem, bDragPossible)

    Appears to do the trick.

     

  3. DevCraft banner
Back to Top